numpy 1.9.2__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/scipy-sphinx-theme/.git +1 -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/doc/sphinxext/.git +1 -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.2/INSTALL.txt +0 -138
- numpy-1.9.2/LICENSE.txt +0 -30
- numpy-1.9.2/MANIFEST.in +0 -26
- numpy-1.9.2/PKG-INFO +0 -39
- numpy-1.9.2/doc/scipy-sphinx-theme/.git +0 -1
- numpy-1.9.2/doc/source/conf.py +0 -331
- numpy-1.9.2/doc/source/dev/gitwash/branch_list.png +0 -0
- numpy-1.9.2/doc/source/dev/gitwash/branch_list_compare.png +0 -0
- numpy-1.9.2/doc/source/dev/gitwash/development_workflow.rst +0 -568
- numpy-1.9.2/doc/source/dev/gitwash/git_links.inc +0 -88
- numpy-1.9.2/doc/source/dev/gitwash/index.rst +0 -14
- numpy-1.9.2/doc/source/dev/index.rst +0 -10
- numpy-1.9.2/doc/source/reference/arrays.classes.rst +0 -427
- numpy-1.9.2/doc/source/reference/arrays.dtypes.rst +0 -534
- numpy-1.9.2/doc/source/reference/arrays.indexing.rst +0 -550
- numpy-1.9.2/doc/source/reference/arrays.interface.rst +0 -336
- numpy-1.9.2/doc/source/reference/arrays.ndarray.rst +0 -609
- numpy-1.9.2/doc/source/reference/arrays.scalars.rst +0 -291
- numpy-1.9.2/doc/source/reference/c-api.array.rst +0 -3362
- numpy-1.9.2/doc/source/reference/c-api.config.rst +0 -103
- numpy-1.9.2/doc/source/reference/c-api.coremath.rst +0 -420
- numpy-1.9.2/doc/source/reference/c-api.dtype.rst +0 -376
- numpy-1.9.2/doc/source/reference/c-api.generalized-ufuncs.rst +0 -171
- numpy-1.9.2/doc/source/reference/c-api.iterator.rst +0 -1298
- numpy-1.9.2/doc/source/reference/c-api.types-and-structures.rst +0 -1204
- numpy-1.9.2/doc/source/reference/c-api.ufunc.rst +0 -399
- numpy-1.9.2/doc/source/reference/index.rst +0 -44
- numpy-1.9.2/doc/source/reference/internals.code-explanations.rst +0 -666
- numpy-1.9.2/doc/source/reference/routines.array-manipulation.rst +0 -113
- numpy-1.9.2/doc/source/reference/routines.io.rst +0 -74
- numpy-1.9.2/doc/source/reference/routines.linalg.rst +0 -88
- numpy-1.9.2/doc/source/reference/routines.ma.rst +0 -405
- numpy-1.9.2/doc/source/reference/routines.sort.rst +0 -42
- numpy-1.9.2/doc/source/reference/routines.statistics.rst +0 -55
- numpy-1.9.2/doc/source/reference/swig.interface-file.rst +0 -1055
- numpy-1.9.2/doc/source/reference/swig.testing.rst +0 -166
- numpy-1.9.2/doc/source/reference/ufuncs.rst +0 -651
- numpy-1.9.2/doc/source/release.rst +0 -19
- numpy-1.9.2/doc/source/user/basics.io.genfromtxt.rst +0 -531
- numpy-1.9.2/doc/source/user/basics.rec.rst +0 -7
- numpy-1.9.2/doc/source/user/c-info.beyond-basics.rst +0 -560
- numpy-1.9.2/doc/source/user/c-info.how-to-extend.rst +0 -642
- numpy-1.9.2/doc/source/user/c-info.python-as-glue.rst +0 -1528
- numpy-1.9.2/doc/source/user/c-info.ufunc-tutorial.rst +0 -1211
- numpy-1.9.2/doc/source/user/install.rst +0 -180
- numpy-1.9.2/doc/sphinxext/.git +0 -1
- numpy-1.9.2/numpy/__init__.py +0 -216
- numpy-1.9.2/numpy/_import_tools.py +0 -348
- numpy-1.9.2/numpy/add_newdocs.py +0 -7518
- numpy-1.9.2/numpy/compat/_inspect.py +0 -221
- numpy-1.9.2/numpy/compat/py3k.py +0 -89
- numpy-1.9.2/numpy/compat/setup.py +0 -12
- numpy-1.9.2/numpy/core/__init__.py +0 -78
- numpy-1.9.2/numpy/core/_internal.py +0 -570
- numpy-1.9.2/numpy/core/_methods.py +0 -134
- numpy-1.9.2/numpy/core/arrayprint.py +0 -752
- numpy-1.9.2/numpy/core/blasdot/_dotblas.c +0 -1255
- numpy-1.9.2/numpy/core/blasdot/apple_sgemv_patch.c +0 -216
- numpy-1.9.2/numpy/core/blasdot/cblas.h +0 -578
- numpy-1.9.2/numpy/core/code_generators/cversions.txt +0 -31
- numpy-1.9.2/numpy/core/code_generators/generate_ufunc_api.py +0 -219
- numpy-1.9.2/numpy/core/code_generators/generate_umath.py +0 -972
- numpy-1.9.2/numpy/core/code_generators/numpy_api.py +0 -412
- numpy-1.9.2/numpy/core/code_generators/ufunc_docstrings.py +0 -3419
- numpy-1.9.2/numpy/core/defchararray.py +0 -2687
- numpy-1.9.2/numpy/core/fromnumeric.py +0 -2938
- numpy-1.9.2/numpy/core/function_base.py +0 -190
- numpy-1.9.2/numpy/core/getlimits.py +0 -306
- numpy-1.9.2/numpy/core/include/numpy/fenv/fenv.c +0 -38
- numpy-1.9.2/numpy/core/include/numpy/fenv/fenv.h +0 -224
- numpy-1.9.2/numpy/core/include/numpy/ndarrayobject.h +0 -237
- numpy-1.9.2/numpy/core/include/numpy/ndarraytypes.h +0 -1820
- numpy-1.9.2/numpy/core/include/numpy/npy_3kcompat.h +0 -506
- numpy-1.9.2/numpy/core/include/numpy/npy_common.h +0 -1038
- numpy-1.9.2/numpy/core/include/numpy/npy_cpu.h +0 -122
- numpy-1.9.2/numpy/core/include/numpy/npy_endian.h +0 -49
- numpy-1.9.2/numpy/core/include/numpy/npy_math.h +0 -479
- numpy-1.9.2/numpy/core/include/numpy/numpyconfig.h +0 -35
- numpy-1.9.2/numpy/core/machar.py +0 -338
- numpy-1.9.2/numpy/core/memmap.py +0 -308
- numpy-1.9.2/numpy/core/numeric.py +0 -2842
- numpy-1.9.2/numpy/core/numerictypes.py +0 -1042
- numpy-1.9.2/numpy/core/records.py +0 -804
- numpy-1.9.2/numpy/core/setup.py +0 -1016
- numpy-1.9.2/numpy/core/setup_common.py +0 -321
- numpy-1.9.2/numpy/core/shape_base.py +0 -277
- numpy-1.9.2/numpy/core/src/multiarray/alloc.c +0 -241
- numpy-1.9.2/numpy/core/src/multiarray/arrayobject.c +0 -1791
- numpy-1.9.2/numpy/core/src/multiarray/arraytypes.c.src +0 -4372
- numpy-1.9.2/numpy/core/src/multiarray/arraytypes.h +0 -13
- numpy-1.9.2/numpy/core/src/multiarray/buffer.c +0 -954
- numpy-1.9.2/numpy/core/src/multiarray/calculation.c +0 -1229
- numpy-1.9.2/numpy/core/src/multiarray/common.c +0 -798
- numpy-1.9.2/numpy/core/src/multiarray/common.h +0 -328
- numpy-1.9.2/numpy/core/src/multiarray/conversion_utils.c +0 -1240
- numpy-1.9.2/numpy/core/src/multiarray/convert.c +0 -589
- numpy-1.9.2/numpy/core/src/multiarray/convert_datatype.c +0 -2199
- numpy-1.9.2/numpy/core/src/multiarray/ctors.c +0 -3785
- numpy-1.9.2/numpy/core/src/multiarray/datetime.c +0 -3823
- numpy-1.9.2/numpy/core/src/multiarray/datetime_busday.c +0 -1322
- numpy-1.9.2/numpy/core/src/multiarray/datetime_busdaycal.c +0 -552
- numpy-1.9.2/numpy/core/src/multiarray/datetime_strings.c +0 -1772
- numpy-1.9.2/numpy/core/src/multiarray/descriptor.c +0 -3658
- numpy-1.9.2/numpy/core/src/multiarray/dtype_transfer.c +0 -4232
- numpy-1.9.2/numpy/core/src/multiarray/einsum.c.src +0 -3013
- numpy-1.9.2/numpy/core/src/multiarray/getset.c +0 -984
- numpy-1.9.2/numpy/core/src/multiarray/hashdescr.c +0 -319
- numpy-1.9.2/numpy/core/src/multiarray/item_selection.c +0 -2711
- numpy-1.9.2/numpy/core/src/multiarray/iterators.c +0 -2160
- numpy-1.9.2/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +0 -1767
- numpy-1.9.2/numpy/core/src/multiarray/mapping.c +0 -3316
- numpy-1.9.2/numpy/core/src/multiarray/mapping.h +0 -73
- numpy-1.9.2/numpy/core/src/multiarray/methods.c +0 -2497
- numpy-1.9.2/numpy/core/src/multiarray/multiarray_tests.c.src +0 -977
- numpy-1.9.2/numpy/core/src/multiarray/multiarraymodule.c +0 -4202
- numpy-1.9.2/numpy/core/src/multiarray/multiarraymodule.h +0 -4
- numpy-1.9.2/numpy/core/src/multiarray/multiarraymodule_onefile.c +0 -58
- numpy-1.9.2/numpy/core/src/multiarray/nditer_api.c +0 -2809
- numpy-1.9.2/numpy/core/src/multiarray/nditer_constr.c +0 -3159
- numpy-1.9.2/numpy/core/src/multiarray/nditer_pywrap.c +0 -2492
- numpy-1.9.2/numpy/core/src/multiarray/number.c +0 -1057
- numpy-1.9.2/numpy/core/src/multiarray/number.h +0 -76
- numpy-1.9.2/numpy/core/src/multiarray/numpymemoryview.c +0 -309
- numpy-1.9.2/numpy/core/src/multiarray/numpyos.c +0 -683
- numpy-1.9.2/numpy/core/src/multiarray/scalarapi.c +0 -861
- numpy-1.9.2/numpy/core/src/multiarray/scalartypes.c.src +0 -4270
- numpy-1.9.2/numpy/core/src/multiarray/scalartypes.h +0 -52
- numpy-1.9.2/numpy/core/src/multiarray/shape.c +0 -1141
- numpy-1.9.2/numpy/core/src/multiarray/ucsnarrow.c +0 -173
- numpy-1.9.2/numpy/core/src/npymath/ieee754.c.src +0 -814
- numpy-1.9.2/numpy/core/src/npymath/npy_math.c.src +0 -527
- numpy-1.9.2/numpy/core/src/npymath/npy_math_complex.c.src +0 -291
- numpy-1.9.2/numpy/core/src/npymath/npy_math_private.h +0 -539
- numpy-1.9.2/numpy/core/src/npysort/heapsort.c.src +0 -341
- numpy-1.9.2/numpy/core/src/npysort/mergesort.c.src +0 -428
- numpy-1.9.2/numpy/core/src/npysort/npysort_common.h +0 -367
- numpy-1.9.2/numpy/core/src/npysort/quicksort.c.src +0 -363
- numpy-1.9.2/numpy/core/src/npysort/selection.c.src +0 -474
- numpy-1.9.2/numpy/core/src/private/npy_config.h +0 -44
- numpy-1.9.2/numpy/core/src/private/npy_partition.h.src +0 -138
- numpy-1.9.2/numpy/core/src/private/npy_sort.h +0 -194
- numpy-1.9.2/numpy/core/src/private/scalarmathmodule.h.src +0 -42
- numpy-1.9.2/numpy/core/src/private/ufunc_override.h +0 -384
- numpy-1.9.2/numpy/core/src/scalarmathmodule.c.src +0 -1980
- numpy-1.9.2/numpy/core/src/umath/funcs.inc.src +0 -715
- numpy-1.9.2/numpy/core/src/umath/loops.c.src +0 -2654
- numpy-1.9.2/numpy/core/src/umath/loops.h.src +0 -501
- numpy-1.9.2/numpy/core/src/umath/operand_flag_tests.c.src +0 -105
- numpy-1.9.2/numpy/core/src/umath/simd.inc.src +0 -881
- numpy-1.9.2/numpy/core/src/umath/test_rational.c.src +0 -1404
- numpy-1.9.2/numpy/core/src/umath/ufunc_object.c +0 -5520
- numpy-1.9.2/numpy/core/src/umath/ufunc_type_resolution.c +0 -2164
- numpy-1.9.2/numpy/core/src/umath/umath_tests.c.src +0 -341
- numpy-1.9.2/numpy/core/src/umath/umathmodule.c +0 -561
- numpy-1.9.2/numpy/core/src/umath/umathmodule_onefile.c +0 -6
- numpy-1.9.2/numpy/core/tests/test_abc.py +0 -45
- numpy-1.9.2/numpy/core/tests/test_api.py +0 -514
- numpy-1.9.2/numpy/core/tests/test_arrayprint.py +0 -167
- numpy-1.9.2/numpy/core/tests/test_blasdot.py +0 -249
- numpy-1.9.2/numpy/core/tests/test_datetime.py +0 -1781
- numpy-1.9.2/numpy/core/tests/test_defchararray.py +0 -642
- numpy-1.9.2/numpy/core/tests/test_deprecations.py +0 -512
- numpy-1.9.2/numpy/core/tests/test_dtype.py +0 -542
- numpy-1.9.2/numpy/core/tests/test_einsum.py +0 -583
- numpy-1.9.2/numpy/core/tests/test_errstate.py +0 -51
- numpy-1.9.2/numpy/core/tests/test_function_base.py +0 -111
- numpy-1.9.2/numpy/core/tests/test_getlimits.py +0 -86
- numpy-1.9.2/numpy/core/tests/test_half.py +0 -439
- numpy-1.9.2/numpy/core/tests/test_indexerrors.py +0 -127
- numpy-1.9.2/numpy/core/tests/test_indexing.py +0 -1014
- numpy-1.9.2/numpy/core/tests/test_item_selection.py +0 -70
- numpy-1.9.2/numpy/core/tests/test_machar.py +0 -30
- numpy-1.9.2/numpy/core/tests/test_memmap.py +0 -127
- numpy-1.9.2/numpy/core/tests/test_multiarray.py +0 -4645
- numpy-1.9.2/numpy/core/tests/test_multiarray_assignment.py +0 -80
- numpy-1.9.2/numpy/core/tests/test_nditer.py +0 -2630
- numpy-1.9.2/numpy/core/tests/test_numeric.py +0 -2117
- numpy-1.9.2/numpy/core/tests/test_numerictypes.py +0 -377
- numpy-1.9.2/numpy/core/tests/test_print.py +0 -245
- numpy-1.9.2/numpy/core/tests/test_records.py +0 -185
- numpy-1.9.2/numpy/core/tests/test_regression.py +0 -2108
- numpy-1.9.2/numpy/core/tests/test_scalarinherit.py +0 -34
- numpy-1.9.2/numpy/core/tests/test_scalarmath.py +0 -275
- numpy-1.9.2/numpy/core/tests/test_shape_base.py +0 -250
- numpy-1.9.2/numpy/core/tests/test_ufunc.py +0 -1153
- numpy-1.9.2/numpy/core/tests/test_umath.py +0 -1695
- numpy-1.9.2/numpy/core/tests/test_umath_complex.py +0 -537
- numpy-1.9.2/numpy/core/tests/test_unicode.py +0 -357
- numpy-1.9.2/numpy/distutils/__init__.py +0 -39
- numpy-1.9.2/numpy/distutils/ccompiler.py +0 -656
- numpy-1.9.2/numpy/distutils/command/autodist.py +0 -43
- numpy-1.9.2/numpy/distutils/command/build.py +0 -39
- numpy-1.9.2/numpy/distutils/command/build_clib.py +0 -284
- numpy-1.9.2/numpy/distutils/command/build_ext.py +0 -503
- numpy-1.9.2/numpy/distutils/command/config.py +0 -476
- numpy-1.9.2/numpy/distutils/exec_command.py +0 -618
- numpy-1.9.2/numpy/distutils/fcompiler/compaq.py +0 -128
- numpy-1.9.2/numpy/distutils/fcompiler/gnu.py +0 -390
- numpy-1.9.2/numpy/distutils/fcompiler/intel.py +0 -205
- numpy-1.9.2/numpy/distutils/fcompiler/pg.py +0 -60
- numpy-1.9.2/numpy/distutils/fcompiler/sun.py +0 -52
- numpy-1.9.2/numpy/distutils/intelccompiler.py +0 -45
- numpy-1.9.2/numpy/distutils/lib2def.py +0 -116
- numpy-1.9.2/numpy/distutils/mingw32ccompiler.py +0 -582
- numpy-1.9.2/numpy/distutils/misc_util.py +0 -2271
- numpy-1.9.2/numpy/distutils/npy_pkg_config.py +0 -464
- numpy-1.9.2/numpy/distutils/system_info.py +0 -2319
- numpy-1.9.2/numpy/distutils/tests/f2py_ext/tests/test_fib2.py +0 -13
- numpy-1.9.2/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py +0 -12
- numpy-1.9.2/numpy/distutils/tests/gen_ext/tests/test_fib3.py +0 -12
- numpy-1.9.2/numpy/distutils/tests/pyrex_ext/tests/test_primes.py +0 -14
- numpy-1.9.2/numpy/distutils/tests/swig_ext/tests/test_example.py +0 -18
- numpy-1.9.2/numpy/distutils/tests/swig_ext/tests/test_example2.py +0 -16
- numpy-1.9.2/numpy/distutils/tests/test_fcompiler_gnu.py +0 -53
- numpy-1.9.2/numpy/distutils/tests/test_fcompiler_intel.py +0 -36
- numpy-1.9.2/numpy/distutils/tests/test_misc_util.py +0 -75
- numpy-1.9.2/numpy/distutils/tests/test_npy_pkg_config.py +0 -98
- numpy-1.9.2/numpy/distutils/unixccompiler.py +0 -113
- numpy-1.9.2/numpy/doc/byteswapping.py +0 -147
- numpy-1.9.2/numpy/doc/creation.py +0 -144
- numpy-1.9.2/numpy/doc/glossary.py +0 -418
- numpy-1.9.2/numpy/doc/indexing.py +0 -437
- numpy-1.9.2/numpy/doc/structured_arrays.py +0 -223
- numpy-1.9.2/numpy/f2py/__init__.py +0 -49
- numpy-1.9.2/numpy/f2py/auxfuncs.py +0 -711
- numpy-1.9.2/numpy/f2py/capi_maps.py +0 -773
- numpy-1.9.2/numpy/f2py/cb_rules.py +0 -539
- numpy-1.9.2/numpy/f2py/cfuncs.py +0 -1224
- numpy-1.9.2/numpy/f2py/common_rules.py +0 -132
- numpy-1.9.2/numpy/f2py/crackfortran.py +0 -2870
- numpy-1.9.2/numpy/f2py/diagnose.py +0 -149
- numpy-1.9.2/numpy/f2py/f2py2e.py +0 -598
- numpy-1.9.2/numpy/f2py/f2py_testing.py +0 -46
- numpy-1.9.2/numpy/f2py/f90mod_rules.py +0 -246
- numpy-1.9.2/numpy/f2py/func2subr.py +0 -291
- numpy-1.9.2/numpy/f2py/rules.py +0 -1448
- numpy-1.9.2/numpy/f2py/setup.py +0 -129
- numpy-1.9.2/numpy/f2py/src/fortranobject.c +0 -972
- numpy-1.9.2/numpy/f2py/src/fortranobject.h +0 -162
- numpy-1.9.2/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +0 -223
- numpy-1.9.2/numpy/f2py/tests/test_array_from_pyobj.py +0 -559
- numpy-1.9.2/numpy/f2py/tests/test_assumed_shape.py +0 -37
- numpy-1.9.2/numpy/f2py/tests/test_callback.py +0 -132
- numpy-1.9.2/numpy/f2py/tests/test_kind.py +0 -36
- numpy-1.9.2/numpy/f2py/tests/test_mixed.py +0 -41
- numpy-1.9.2/numpy/f2py/tests/test_regression.py +0 -32
- numpy-1.9.2/numpy/f2py/tests/test_return_character.py +0 -142
- numpy-1.9.2/numpy/f2py/tests/test_return_complex.py +0 -169
- numpy-1.9.2/numpy/f2py/tests/test_return_integer.py +0 -178
- numpy-1.9.2/numpy/f2py/tests/test_return_logical.py +0 -187
- numpy-1.9.2/numpy/f2py/tests/test_return_real.py +0 -203
- numpy-1.9.2/numpy/f2py/tests/test_size.py +0 -47
- numpy-1.9.2/numpy/f2py/tests/util.py +0 -353
- numpy-1.9.2/numpy/f2py/use_rules.py +0 -109
- numpy-1.9.2/numpy/fft/fftpack.c +0 -1501
- numpy-1.9.2/numpy/fft/fftpack.h +0 -28
- numpy-1.9.2/numpy/fft/fftpack.py +0 -1169
- numpy-1.9.2/numpy/fft/fftpack_litemodule.c +0 -371
- numpy-1.9.2/numpy/fft/info.py +0 -179
- numpy-1.9.2/numpy/fft/setup.py +0 -20
- numpy-1.9.2/numpy/fft/tests/test_fftpack.py +0 -75
- numpy-1.9.2/numpy/fft/tests/test_helper.py +0 -78
- numpy-1.9.2/numpy/lib/_iotools.py +0 -891
- numpy-1.9.2/numpy/lib/arraypad.py +0 -1475
- numpy-1.9.2/numpy/lib/arraysetops.py +0 -464
- numpy-1.9.2/numpy/lib/arrayterator.py +0 -226
- numpy-1.9.2/numpy/lib/financial.py +0 -737
- numpy-1.9.2/numpy/lib/format.py +0 -771
- numpy-1.9.2/numpy/lib/function_base.py +0 -3884
- numpy-1.9.2/numpy/lib/index_tricks.py +0 -869
- numpy-1.9.2/numpy/lib/info.py +0 -151
- numpy-1.9.2/numpy/lib/nanfunctions.py +0 -1158
- numpy-1.9.2/numpy/lib/npyio.py +0 -1918
- numpy-1.9.2/numpy/lib/polynomial.py +0 -1271
- numpy-1.9.2/numpy/lib/recfunctions.py +0 -1003
- numpy-1.9.2/numpy/lib/setup.py +0 -23
- numpy-1.9.2/numpy/lib/shape_base.py +0 -865
- numpy-1.9.2/numpy/lib/src/_compiled_base.c +0 -1761
- numpy-1.9.2/numpy/lib/stride_tricks.py +0 -123
- numpy-1.9.2/numpy/lib/tests/test__iotools.py +0 -326
- numpy-1.9.2/numpy/lib/tests/test__version.py +0 -57
- numpy-1.9.2/numpy/lib/tests/test_arraypad.py +0 -560
- numpy-1.9.2/numpy/lib/tests/test_arraysetops.py +0 -301
- numpy-1.9.2/numpy/lib/tests/test_financial.py +0 -160
- numpy-1.9.2/numpy/lib/tests/test_format.py +0 -716
- numpy-1.9.2/numpy/lib/tests/test_function_base.py +0 -2145
- numpy-1.9.2/numpy/lib/tests/test_index_tricks.py +0 -289
- numpy-1.9.2/numpy/lib/tests/test_io.py +0 -1754
- numpy-1.9.2/numpy/lib/tests/test_nanfunctions.py +0 -774
- numpy-1.9.2/numpy/lib/tests/test_polynomial.py +0 -177
- numpy-1.9.2/numpy/lib/tests/test_recfunctions.py +0 -705
- numpy-1.9.2/numpy/lib/tests/test_shape_base.py +0 -368
- numpy-1.9.2/numpy/lib/tests/test_stride_tricks.py +0 -238
- numpy-1.9.2/numpy/lib/tests/test_twodim_base.py +0 -504
- numpy-1.9.2/numpy/lib/tests/test_type_check.py +0 -328
- numpy-1.9.2/numpy/lib/twodim_base.py +0 -1003
- numpy-1.9.2/numpy/lib/type_check.py +0 -605
- numpy-1.9.2/numpy/lib/utils.py +0 -1176
- numpy-1.9.2/numpy/linalg/lapack_lite/python_xerbla.c +0 -47
- numpy-1.9.2/numpy/linalg/lapack_litemodule.c +0 -362
- numpy-1.9.2/numpy/linalg/linalg.py +0 -2136
- numpy-1.9.2/numpy/linalg/tests/test_build.py +0 -53
- numpy-1.9.2/numpy/linalg/tests/test_linalg.py +0 -1156
- numpy-1.9.2/numpy/linalg/tests/test_regression.py +0 -90
- numpy-1.9.2/numpy/linalg/umath_linalg.c.src +0 -3210
- numpy-1.9.2/numpy/ma/__init__.py +0 -58
- numpy-1.9.2/numpy/ma/bench.py +0 -166
- numpy-1.9.2/numpy/ma/core.py +0 -7374
- numpy-1.9.2/numpy/ma/extras.py +0 -1932
- numpy-1.9.2/numpy/ma/mrecords.py +0 -734
- numpy-1.9.2/numpy/ma/setup.py +0 -20
- numpy-1.9.2/numpy/ma/tests/test_core.py +0 -3706
- numpy-1.9.2/numpy/ma/tests/test_extras.py +0 -954
- numpy-1.9.2/numpy/ma/tests/test_mrecords.py +0 -521
- numpy-1.9.2/numpy/ma/tests/test_old_ma.py +0 -869
- numpy-1.9.2/numpy/ma/tests/test_regression.py +0 -75
- numpy-1.9.2/numpy/ma/tests/test_subclassing.py +0 -236
- numpy-1.9.2/numpy/ma/testutils.py +0 -240
- numpy-1.9.2/numpy/ma/timer_comparison.py +0 -459
- numpy-1.9.2/numpy/matlib.py +0 -358
- numpy-1.9.2/numpy/matrixlib/defmatrix.py +0 -1094
- numpy-1.9.2/numpy/matrixlib/tests/test_defmatrix.py +0 -400
- numpy-1.9.2/numpy/matrixlib/tests/test_multiarray.py +0 -18
- numpy-1.9.2/numpy/matrixlib/tests/test_numeric.py +0 -10
- numpy-1.9.2/numpy/matrixlib/tests/test_regression.py +0 -34
- numpy-1.9.2/numpy/polynomial/_polybase.py +0 -962
- numpy-1.9.2/numpy/polynomial/chebyshev.py +0 -2056
- numpy-1.9.2/numpy/polynomial/hermite.py +0 -1789
- numpy-1.9.2/numpy/polynomial/hermite_e.py +0 -1786
- numpy-1.9.2/numpy/polynomial/laguerre.py +0 -1781
- numpy-1.9.2/numpy/polynomial/legendre.py +0 -1809
- numpy-1.9.2/numpy/polynomial/polytemplate.py +0 -927
- numpy-1.9.2/numpy/polynomial/polyutils.py +0 -403
- numpy-1.9.2/numpy/random/mtrand/distributions.c +0 -892
- numpy-1.9.2/numpy/random/mtrand/mtrand.c +0 -31204
- numpy-1.9.2/numpy/random/mtrand/mtrand.pyx +0 -4706
- numpy-1.9.2/numpy/random/setup.py +0 -74
- numpy-1.9.2/numpy/random/tests/test_random.py +0 -707
- numpy-1.9.2/numpy/random/tests/test_regression.py +0 -86
- numpy-1.9.2/numpy/setup.py +0 -27
- numpy-1.9.2/numpy/testing/__init__.py +0 -16
- numpy-1.9.2/numpy/testing/decorators.py +0 -271
- numpy-1.9.2/numpy/testing/noseclasses.py +0 -353
- numpy-1.9.2/numpy/testing/nosetester.py +0 -504
- numpy-1.9.2/numpy/testing/print_coercion_tables.py +0 -89
- numpy-1.9.2/numpy/testing/setup.py +0 -20
- numpy-1.9.2/numpy/testing/tests/test_decorators.py +0 -185
- numpy-1.9.2/numpy/testing/tests/test_utils.py +0 -558
- numpy-1.9.2/numpy/testing/utils.py +0 -1715
- numpy-1.9.2/numpy/tests/test_ctypeslib.py +0 -102
- numpy-1.9.2/numpy/tests/test_matlib.py +0 -55
- numpy-1.9.2/numpy/version.py +0 -10
- numpy-1.9.2/setup.py +0 -251
- numpy-1.9.2/site.cfg.example +0 -157
- numpy-1.9.2/tools/swig/README +0 -135
- numpy-1.9.2/tools/swig/numpy.i +0 -3085
- numpy-1.9.2/tools/swig/test/Array.i +0 -102
- numpy-1.9.2/tools/swig/test/Makefile +0 -34
- numpy-1.9.2/tools/swig/test/setup.py +0 -64
- numpy-1.9.2/tools/swig/test/testArray.py +0 -284
- numpy-1.9.2/tools/swig/test/testFarray.py +0 -159
- numpy-1.9.2/tools/swig/test/testFortran.py +0 -173
- numpy-1.9.2/tools/swig/test/testMatrix.py +0 -362
- numpy-1.9.2/tools/swig/test/testSuperTensor.py +0 -388
- numpy-1.9.2/tools/swig/test/testTensor.py +0 -402
- numpy-1.9.2/tools/swig/test/testVector.py +0 -381
- {numpy-1.9.2 → numpy-1.10.0.post2}/BENTO_BUILD.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/COMPATIBILITY +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/DEV_README.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/README.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/THANKS.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/Makefile +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/BUGS.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/FAQ.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/HISTORY.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/Makefile +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/OLDNEWS.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/README.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/Release-1.x.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/Release-2.x.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/Release-3.x.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/Release-4.x.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/TESTING.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/THANKS.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/TODO.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/apps.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/bugs.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/collectinput.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/commands.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/default.css +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/docutils.conf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/ex1/arr.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/ex1/bar.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/ex1/foo.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/ex1/foobar-smart.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/ex1/foobar.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/ex1/foobarmodule.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/ex1/runme +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2py.1 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2py2e.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/README.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/aerostructure.jpg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/flow.jpg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/mk_html.sh +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/mk_pdf.sh +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/mk_ps.sh +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/exp1.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/exp1mess.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/exp1session.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/foo.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/foom.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/structure.jpg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/fortranobject.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/hello.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/index.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/intro.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarray/array_from_pyobj.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarray/bar.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarray/foo.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarray/fortran_array_from_pyobj.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarray/fun.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarray/run.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarray/transpose.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/multiarrays.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/notes.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/oldnews.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/options.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/pyforttest.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/pytest.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/python9.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/signaturefile.tex +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/simple.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/simple_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/using_F_compiler.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/f2py/win32_notes.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/postprocess.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.3.0-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.4.0-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.5.0-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.6.0-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.6.1-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.6.2-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.7.0-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.7.1-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.7.2-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.8.0-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.8.1-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.8.2-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.9.0-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.9.1-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/1.9.2-notes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/release/time_based_proposal.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/.gitignore +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/Makefile +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/README.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_static/scipyshiny_small.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/layout.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/searchbox.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/sourcelink.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/extend.css +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/pygments.css +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/scipy-central.css +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/spc-bootstrap.css +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/spc-extend.css +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/all-icons.svg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/contents.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/create-new-account-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-icon-shrunk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-icon.svg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-list-icon-tiniest.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-list-icon-tiny.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-list-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ad.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ae.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-af.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ag.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ai.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-al.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-am.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ao.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-aq.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ar.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-as.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-at.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-au.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-aw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-az.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ba.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bb.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bd.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-be.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bh.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bi.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bj.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bl.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bo.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-br.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bs.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bt.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-by.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ca.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cc.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cd.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ch.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ci.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ck.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cl.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-co.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cu.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cv.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cx.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cy.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-de.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dj.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-do.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ec.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ee.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-eg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-er.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-es.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-et.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fi.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fj.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fo.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ga.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gb.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gd.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ge.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gh.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gi.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gl.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gq.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gs.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gt.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gu.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gy.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ht.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hu.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-id.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ie.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-il.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-im.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-in.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-io.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-iq.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ir.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-is.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-it.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-je.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-jm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-jo.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-jp.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ke.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kh.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ki.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-km.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kp.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ky.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-la.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lb.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lc.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-li.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ls.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lt.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lu.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lv.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ly.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ma.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mc.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-md.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-me.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mh.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ml.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mo.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mp.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mq.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ms.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mt.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mu.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mv.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mx.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-my.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-na.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nc.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ne.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ng.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ni.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nl.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-no.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-np.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nu.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-om.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pa.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pe.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ph.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pl.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ps.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pt.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-py.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-qa.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-re.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ro.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-rs.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ru.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-rw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sa.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sb.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sc.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sd.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-se.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sh.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-si.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sj.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sl.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-so.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-st.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sv.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sy.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tc.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-td.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-th.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tj.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tl.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-to.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tr.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tt.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tv.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ua.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ug.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-um.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-us.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-uy.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-uz.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-va.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vc.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ve.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vg.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vi.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vn.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vu.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-wf.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ws.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ye.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-za.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-zm.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-zw.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/glyphicons-halflings-white.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/glyphicons-halflings.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/important-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/information-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/internet-web-browser.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-icon-shrunk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-icon.svg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-list-icon-tiny.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-list-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/navigation.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/person-list-icon-tiny.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/person-list-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipy-logo.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipy_org_logo.gif +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipycentral_logo.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipyshiny_small.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/send-email-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-icon-shrunk.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-icon.svg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-list-icon-tiniest.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-list-icon-tiny.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-list-icon.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/transparent-pixel.gif +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/ui-anim_basic_16x16.gif +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/js/copybutton.js +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/accordion.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/alerts.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/bootstrap.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/breadcrumbs.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/button-groups.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/buttons.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/carousel.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/close.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/code.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/component-animations.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/dropdowns.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/forms.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/grid.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/hero-unit.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/labels-badges.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/layouts.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/media.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/mixins.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/modals.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/navbar.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/navs.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/pager.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/pagination.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/popovers.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/progress-bars.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/reset.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-1200px-min.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-767px-max.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-768px-979px.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-navbar.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-utilities.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/scaffolding.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/sprites.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/tables.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/thumbnails.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/tooltip.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/type.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/utilities.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/variables.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/wells.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-bootstrap.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-content.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-extend.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-footer.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-header.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-rightsidebar.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-utils.less +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/scipy.css_t +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/theme.conf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/conf.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/index.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc_2.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc_3.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc_4.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_optimize.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/_templates/autosummary/class.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/_templates/indexcontent.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/_templates/indexsidebar.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/_templates/layout.html +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/about.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/bugs.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/contents.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/configure_git.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/development_setup.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/dot2_dot3.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/following_latest.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/forking_button.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/git_development.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/git_intro.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/git_resources.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash/pull_button.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/dev/gitwash_links.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/advanced.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/allocarr.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/allocarr_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/array.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/array_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/calculate.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/calculate_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/callback.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/callback2.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/callback_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/common.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/common_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/compile_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/distutils.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/extcallback.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/extcallback_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/fib1.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/fib1.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/fib2.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/fib3.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/ftype.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/ftype_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/getting-started.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/index.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/moddata.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/moddata_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/python-usage.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/run_main_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/scalar.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/scalar_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/setup_example.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/signature-file.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/spam.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/spam_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/string.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/string_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/usage.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/var.pyf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/f2py/var_session.dat +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/glossary.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/license.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/datetime-proposal.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/datetime-proposal3.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/deferred-ufunc-evaluation.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/generalized-ufuncs.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/groupby_additions.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/index.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/math_config_clean.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/missing-data.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/new-iterator-ufunc.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/newbugtracker.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/npy-format.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/structured_array_extensions.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/ufunc-overrides.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/neps/warnfix.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/arrays.datetime.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/arrays.nditer.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/arrays.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/c-api.deprecations.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/c-api.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/distutils.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/figures/dtype-hierarchy.dia +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/figures/dtype-hierarchy.pdf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/figures/dtype-hierarchy.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/figures/threefundamental.fig +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/figures/threefundamental.pdf +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/figures/threefundamental.png +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/internals.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/maskedarray.baseclass.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/maskedarray.generic.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/maskedarray.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.array-creation.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.bitwise.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.char.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.ctypeslib.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.datetime.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.dtype.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.dual.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.emath.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.err.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.fft.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.financial.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.functional.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.help.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.indexing.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.logic.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.math.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.matlib.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.numarray.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.oldnumeric.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.other.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.padding.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.chebyshev.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.classes.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.hermite.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.hermite_e.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.laguerre.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.legendre.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.package.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.poly1d.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.polynomial.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.random.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.set.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.testing.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/routines.window.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/reference/swig.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.broadcasting.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.byteswapping.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.creation.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.indexing.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.io.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.subclassing.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/basics.types.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/c-info.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/howtofind.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/index.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/introduction.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/misc.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/performance.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/source/user/whatisnumpy.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/.gitignore +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/.travis.yml +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/LICENSE.txt +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/MANIFEST.in +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/README.rst +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/comment_eater.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/compiler_unparse.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/docscrape.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/docscrape_sphinx.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/linkcode.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/numpydoc.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/phantom_import.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/plot_directive.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_docscrape.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_linkcode.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_phantom_import.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_plot_directive.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_traitsdoc.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/traitsdoc.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/doc/sphinxext/setup.py +0 -0
- {numpy-1.9.2/numpy/core/code_generators → numpy-1.10.0.post2/numpy/_build_utils}/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/compat/__init__.py +0 -0
- {numpy-1.9.2/numpy/distutils/tests/f2py_ext → numpy-1.10.0.post2/numpy/core/code_generators}/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/code_generators/genapi.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/code_generators/generate_numpy_api.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/cversions.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/_neighborhood_iterator_imp.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/_numpyconfig.h.in +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/arrayobject.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/arrayscalars.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/halffloat.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/noprefix.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_1_7_deprecated_api.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_interrupt.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_no_deprecated_api.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_os.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/old_defines.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/oldnumeric.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/ufuncobject.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/include/numpy/utils.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/info.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/mlib.ini.in +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/npymath.ini.in +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/dummymodule.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/_datetime.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/alloc.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign_array.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign_scalar.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/arrayobject.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/buffer.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/calculation.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/conversion_utils.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/convert.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/convert_datatype.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/ctors.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/datetime_busday.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/datetime_busdaycal.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/datetime_strings.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/descriptor.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/flagsobject.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/getset.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/hashdescr.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/item_selection.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/iterators.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/methods.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/nditer_impl.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/nditer_pywrap.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/nditer_templ.c.src +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/numpymemoryview.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/numpyos.h +0 -0
- {numpy-1.9.2/numpy/core/blasdot → numpy-1.10.0.post2/numpy/core/src/multiarray}/python_xerbla.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/refcount.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/refcount.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/sequence.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/sequence.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/shape.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/ucsnarrow.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/usertypes.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/multiarray/usertypes.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/npymath/_signbit.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/npymath/halffloat.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/npymath/npy_math_common.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/npysort/binsearch.c.src +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/private/lowlevel_strided_loops.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/private/npy_binsearch.h.src +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/private/npy_fpmath.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/private/npy_pycompat.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/umath/reduction.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/umath/reduction.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/umath/struct_ufunc_test.c.src +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/umath/ufunc_object.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/src/umath/ufunc_type_resolution.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/tests/data/astype_copy.pkl +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/tests/data/recarray_from_file.fits +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/core/tests/test_scalarprint.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/ctypeslib.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/__version__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/bdist_rpm.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/build_py.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/build_scripts.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/build_src.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/config_compiler.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/develop.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/egg_info.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/install.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/install_clib.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/install_data.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/install_headers.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/command/sdist.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/compat.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/conv_template.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/core.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/cpuinfo.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/environment.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/extension.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/absoft.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/g95.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/hpux.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/ibm.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/lahey.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/mips.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/nag.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/none.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/pathf95.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/vast.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/from_template.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/info.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/line_endings.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/log.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/mingw/gfortran_vs2003_hack.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/numpy_distribution.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/pathccompiler.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/setup.py +0 -0
- {numpy-1.9.2/numpy/distutils/tests/f2py_f90_ext → numpy-1.10.0.post2/numpy/distutils/tests/f2py_ext}/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_ext/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_ext/src/fib1.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_ext/src/fib2.pyf +0 -0
- {numpy-1.9.2/numpy/distutils/tests/gen_ext → numpy-1.10.0.post2/numpy/distutils/tests/f2py_f90_ext}/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_f90_ext/include/body.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_f90_ext/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90 +0 -0
- {numpy-1.9.2/numpy/distutils/tests/pyrex_ext → numpy-1.10.0.post2/numpy/distutils/tests/gen_ext}/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/gen_ext/setup.py +0 -0
- {numpy-1.9.2/numpy/distutils/tests/swig_ext → numpy-1.10.0.post2/numpy/distutils/tests/pyrex_ext}/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/pyrex_ext/primes.pyx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/pyrex_ext/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/example.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/example.i +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/zoo.cc +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/zoo.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/zoo.i +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/distutils/tests/test_exec_command.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/basics.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/broadcasting.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/constants.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/howtofind.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/internals.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/io.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/jargon.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/methods_vs_functions.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/misc.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/performance.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/subclassing.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/doc/ufuncs.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/dual.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/__version__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/info.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/foo_free.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/foo_mod.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/foo_use.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/precision.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/kind/foo.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/mixed/foo.f +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/mixed/foo_fixed.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/mixed/foo_free.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/regression/inout.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/f2py/tests/src/size/foo.f90 +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/fft/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/fft/helper.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/_datasource.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/_version.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/scimath.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/tests/data/python3.npy +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/tests/data/win64python2.npy +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/tests/test__datasource.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/tests/test_arrayterator.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/tests/test_regression.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/tests/test_ufunclike.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/tests/test_utils.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/ufunclike.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/lib/user_array.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/info.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/blas_lite.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/dlamch.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/dlapack_lite.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/f2c.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/f2c_lite.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/zlapack_lite.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/linalg/tests/test_deprecations.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/ma/version.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/matrixlib/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/matrixlib/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/polynomial.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/setup.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_chebyshev.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_classes.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_hermite.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_hermite_e.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_laguerre.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_legendre.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_polynomial.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_polyutils.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_printing.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/__init__.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/info.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/Python.pxi +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/distributions.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/generate_mtrand_c.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/initarray.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/initarray.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/mtrand_py_helper.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/numpy.pxd +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/randomkit.c +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/random/mtrand/randomkit.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/numpy/testing/tests/test_doctesting.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/setupegg.py +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/Makefile +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/pyfragments.swg +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Array1.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Array1.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Array2.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Array2.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Farray.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Farray.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Farray.i +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Fortran.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Fortran.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Fortran.i +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Matrix.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Matrix.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Matrix.i +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/SuperTensor.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/SuperTensor.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/SuperTensor.i +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Tensor.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Tensor.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Tensor.i +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Vector.cxx +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Vector.h +0 -0
- {numpy-1.9.2 → numpy-1.10.0.post2}/tools/swig/test/Vector.i +0 -0
|
@@ -1,3706 +0,0 @@
|
|
|
1
|
-
# pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102
|
|
2
|
-
"""Tests suite for MaskedArray & subclassing.
|
|
3
|
-
|
|
4
|
-
:author: Pierre Gerard-Marchant
|
|
5
|
-
:contact: pierregm_at_uga_dot_edu
|
|
6
|
-
"""
|
|
7
|
-
from __future__ import division, absolute_import, print_function
|
|
8
|
-
|
|
9
|
-
__author__ = "Pierre GF Gerard-Marchant"
|
|
10
|
-
|
|
11
|
-
import warnings
|
|
12
|
-
import sys
|
|
13
|
-
import pickle
|
|
14
|
-
from functools import reduce
|
|
15
|
-
|
|
16
|
-
from nose.tools import assert_raises
|
|
17
|
-
|
|
18
|
-
import numpy as np
|
|
19
|
-
import numpy.ma.core
|
|
20
|
-
import numpy.core.fromnumeric as fromnumeric
|
|
21
|
-
from numpy import ndarray
|
|
22
|
-
from numpy.ma.testutils import *
|
|
23
|
-
from numpy.ma.core import *
|
|
24
|
-
from numpy.compat import asbytes, asbytes_nested
|
|
25
|
-
|
|
26
|
-
pi = np.pi
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
#..............................................................................
|
|
30
|
-
class TestMaskedArray(TestCase):
|
|
31
|
-
# Base test class for MaskedArrays.
|
|
32
|
-
|
|
33
|
-
def setUp(self):
|
|
34
|
-
# Base data definition.
|
|
35
|
-
x = np.array([1., 1., 1., -2., pi/2.0, 4., 5., -10., 10., 1., 2., 3.])
|
|
36
|
-
y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.])
|
|
37
|
-
a10 = 10.
|
|
38
|
-
m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
|
39
|
-
m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
|
|
40
|
-
xm = masked_array(x, mask=m1)
|
|
41
|
-
ym = masked_array(y, mask=m2)
|
|
42
|
-
z = np.array([-.5, 0., .5, .8])
|
|
43
|
-
zm = masked_array(z, mask=[0, 1, 0, 0])
|
|
44
|
-
xf = np.where(m1, 1e+20, x)
|
|
45
|
-
xm.set_fill_value(1e+20)
|
|
46
|
-
self.d = (x, y, a10, m1, m2, xm, ym, z, zm, xf)
|
|
47
|
-
|
|
48
|
-
def test_basicattributes(self):
|
|
49
|
-
# Tests some basic array attributes.
|
|
50
|
-
a = array([1, 3, 2])
|
|
51
|
-
b = array([1, 3, 2], mask=[1, 0, 1])
|
|
52
|
-
assert_equal(a.ndim, 1)
|
|
53
|
-
assert_equal(b.ndim, 1)
|
|
54
|
-
assert_equal(a.size, 3)
|
|
55
|
-
assert_equal(b.size, 3)
|
|
56
|
-
assert_equal(a.shape, (3,))
|
|
57
|
-
assert_equal(b.shape, (3,))
|
|
58
|
-
|
|
59
|
-
def test_basic0d(self):
|
|
60
|
-
# Checks masking a scalar
|
|
61
|
-
x = masked_array(0)
|
|
62
|
-
assert_equal(str(x), '0')
|
|
63
|
-
x = masked_array(0, mask=True)
|
|
64
|
-
assert_equal(str(x), str(masked_print_option))
|
|
65
|
-
x = masked_array(0, mask=False)
|
|
66
|
-
assert_equal(str(x), '0')
|
|
67
|
-
x = array(0, mask=1)
|
|
68
|
-
self.assertTrue(x.filled().dtype is x._data.dtype)
|
|
69
|
-
|
|
70
|
-
def test_basic1d(self):
|
|
71
|
-
# Test of basic array creation and properties in 1 dimension.
|
|
72
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
73
|
-
self.assertTrue(not isMaskedArray(x))
|
|
74
|
-
self.assertTrue(isMaskedArray(xm))
|
|
75
|
-
self.assertTrue((xm - ym).filled(0).any())
|
|
76
|
-
fail_if_equal(xm.mask.astype(int), ym.mask.astype(int))
|
|
77
|
-
s = x.shape
|
|
78
|
-
assert_equal(np.shape(xm), s)
|
|
79
|
-
assert_equal(xm.shape, s)
|
|
80
|
-
assert_equal(xm.dtype, x.dtype)
|
|
81
|
-
assert_equal(zm.dtype, z.dtype)
|
|
82
|
-
assert_equal(xm.size, reduce(lambda x, y:x * y, s))
|
|
83
|
-
assert_equal(count(xm), len(m1) - reduce(lambda x, y:x + y, m1))
|
|
84
|
-
assert_array_equal(xm, xf)
|
|
85
|
-
assert_array_equal(filled(xm, 1.e20), xf)
|
|
86
|
-
assert_array_equal(x, xm)
|
|
87
|
-
|
|
88
|
-
def test_basic2d(self):
|
|
89
|
-
# Test of basic array creation and properties in 2 dimensions.
|
|
90
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
91
|
-
for s in [(4, 3), (6, 2)]:
|
|
92
|
-
x.shape = s
|
|
93
|
-
y.shape = s
|
|
94
|
-
xm.shape = s
|
|
95
|
-
ym.shape = s
|
|
96
|
-
xf.shape = s
|
|
97
|
-
#
|
|
98
|
-
self.assertTrue(not isMaskedArray(x))
|
|
99
|
-
self.assertTrue(isMaskedArray(xm))
|
|
100
|
-
assert_equal(shape(xm), s)
|
|
101
|
-
assert_equal(xm.shape, s)
|
|
102
|
-
assert_equal(xm.size, reduce(lambda x, y:x * y, s))
|
|
103
|
-
assert_equal(count(xm), len(m1) - reduce(lambda x, y:x + y, m1))
|
|
104
|
-
assert_equal(xm, xf)
|
|
105
|
-
assert_equal(filled(xm, 1.e20), xf)
|
|
106
|
-
assert_equal(x, xm)
|
|
107
|
-
|
|
108
|
-
def test_concatenate_basic(self):
|
|
109
|
-
# Tests concatenations.
|
|
110
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
111
|
-
# basic concatenation
|
|
112
|
-
assert_equal(np.concatenate((x, y)), concatenate((xm, ym)))
|
|
113
|
-
assert_equal(np.concatenate((x, y)), concatenate((x, y)))
|
|
114
|
-
assert_equal(np.concatenate((x, y)), concatenate((xm, y)))
|
|
115
|
-
assert_equal(np.concatenate((x, y, x)), concatenate((x, ym, x)))
|
|
116
|
-
|
|
117
|
-
def test_concatenate_alongaxis(self):
|
|
118
|
-
# Tests concatenations.
|
|
119
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
120
|
-
# Concatenation along an axis
|
|
121
|
-
s = (3, 4)
|
|
122
|
-
x.shape = y.shape = xm.shape = ym.shape = s
|
|
123
|
-
assert_equal(xm.mask, np.reshape(m1, s))
|
|
124
|
-
assert_equal(ym.mask, np.reshape(m2, s))
|
|
125
|
-
xmym = concatenate((xm, ym), 1)
|
|
126
|
-
assert_equal(np.concatenate((x, y), 1), xmym)
|
|
127
|
-
assert_equal(np.concatenate((xm.mask, ym.mask), 1), xmym._mask)
|
|
128
|
-
#
|
|
129
|
-
x = zeros(2)
|
|
130
|
-
y = array(ones(2), mask=[False, True])
|
|
131
|
-
z = concatenate((x, y))
|
|
132
|
-
assert_array_equal(z, [0, 0, 1, 1])
|
|
133
|
-
assert_array_equal(z.mask, [False, False, False, True])
|
|
134
|
-
z = concatenate((y, x))
|
|
135
|
-
assert_array_equal(z, [1, 1, 0, 0])
|
|
136
|
-
assert_array_equal(z.mask, [False, True, False, False])
|
|
137
|
-
|
|
138
|
-
def test_concatenate_flexible(self):
|
|
139
|
-
# Tests the concatenation on flexible arrays.
|
|
140
|
-
data = masked_array(list(zip(np.random.rand(10),
|
|
141
|
-
np.arange(10))),
|
|
142
|
-
dtype=[('a', float), ('b', int)])
|
|
143
|
-
#
|
|
144
|
-
test = concatenate([data[:5], data[5:]])
|
|
145
|
-
assert_equal_records(test, data)
|
|
146
|
-
|
|
147
|
-
def test_creation_ndmin(self):
|
|
148
|
-
# Check the use of ndmin
|
|
149
|
-
x = array([1, 2, 3], mask=[1, 0, 0], ndmin=2)
|
|
150
|
-
assert_equal(x.shape, (1, 3))
|
|
151
|
-
assert_equal(x._data, [[1, 2, 3]])
|
|
152
|
-
assert_equal(x._mask, [[1, 0, 0]])
|
|
153
|
-
|
|
154
|
-
def test_creation_ndmin_from_maskedarray(self):
|
|
155
|
-
# Make sure we're not losing the original mask w/ ndmin
|
|
156
|
-
x = array([1, 2, 3])
|
|
157
|
-
x[-1] = masked
|
|
158
|
-
xx = array(x, ndmin=2, dtype=float)
|
|
159
|
-
assert_equal(x.shape, x._mask.shape)
|
|
160
|
-
assert_equal(xx.shape, xx._mask.shape)
|
|
161
|
-
|
|
162
|
-
def test_creation_maskcreation(self):
|
|
163
|
-
# Tests how masks are initialized at the creation of Maskedarrays.
|
|
164
|
-
data = arange(24, dtype=float)
|
|
165
|
-
data[[3, 6, 15]] = masked
|
|
166
|
-
dma_1 = MaskedArray(data)
|
|
167
|
-
assert_equal(dma_1.mask, data.mask)
|
|
168
|
-
dma_2 = MaskedArray(dma_1)
|
|
169
|
-
assert_equal(dma_2.mask, dma_1.mask)
|
|
170
|
-
dma_3 = MaskedArray(dma_1, mask=[1, 0, 0, 0] * 6)
|
|
171
|
-
fail_if_equal(dma_3.mask, dma_1.mask)
|
|
172
|
-
|
|
173
|
-
def test_creation_with_list_of_maskedarrays(self):
|
|
174
|
-
# Tests creaating a masked array from alist of masked arrays.
|
|
175
|
-
x = array(np.arange(5), mask=[1, 0, 0, 0, 0])
|
|
176
|
-
data = array((x, x[::-1]))
|
|
177
|
-
assert_equal(data, [[0, 1, 2, 3, 4], [4, 3, 2, 1, 0]])
|
|
178
|
-
assert_equal(data._mask, [[1, 0, 0, 0, 0], [0, 0, 0, 0, 1]])
|
|
179
|
-
#
|
|
180
|
-
x.mask = nomask
|
|
181
|
-
data = array((x, x[::-1]))
|
|
182
|
-
assert_equal(data, [[0, 1, 2, 3, 4], [4, 3, 2, 1, 0]])
|
|
183
|
-
self.assertTrue(data.mask is nomask)
|
|
184
|
-
|
|
185
|
-
def test_asarray(self):
|
|
186
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
187
|
-
xm.fill_value = -9999
|
|
188
|
-
xm._hardmask = True
|
|
189
|
-
xmm = asarray(xm)
|
|
190
|
-
assert_equal(xmm._data, xm._data)
|
|
191
|
-
assert_equal(xmm._mask, xm._mask)
|
|
192
|
-
assert_equal(xmm.fill_value, xm.fill_value)
|
|
193
|
-
assert_equal(xmm._hardmask, xm._hardmask)
|
|
194
|
-
|
|
195
|
-
def test_fix_invalid(self):
|
|
196
|
-
# Checks fix_invalid.
|
|
197
|
-
with np.errstate(invalid='ignore'):
|
|
198
|
-
data = masked_array([np.nan, 0., 1.], mask=[0, 0, 1])
|
|
199
|
-
data_fixed = fix_invalid(data)
|
|
200
|
-
assert_equal(data_fixed._data, [data.fill_value, 0., 1.])
|
|
201
|
-
assert_equal(data_fixed._mask, [1., 0., 1.])
|
|
202
|
-
|
|
203
|
-
def test_maskedelement(self):
|
|
204
|
-
# Test of masked element
|
|
205
|
-
x = arange(6)
|
|
206
|
-
x[1] = masked
|
|
207
|
-
self.assertTrue(str(masked) == '--')
|
|
208
|
-
self.assertTrue(x[1] is masked)
|
|
209
|
-
assert_equal(filled(x[1], 0), 0)
|
|
210
|
-
# don't know why these should raise an exception...
|
|
211
|
-
#self.assertRaises(Exception, lambda x,y: x+y, masked, masked)
|
|
212
|
-
#self.assertRaises(Exception, lambda x,y: x+y, masked, 2)
|
|
213
|
-
#self.assertRaises(Exception, lambda x,y: x+y, masked, xx)
|
|
214
|
-
#self.assertRaises(Exception, lambda x,y: x+y, xx, masked)
|
|
215
|
-
|
|
216
|
-
def test_set_element_as_object(self):
|
|
217
|
-
# Tests setting elements with object
|
|
218
|
-
a = empty(1, dtype=object)
|
|
219
|
-
x = (1, 2, 3, 4, 5)
|
|
220
|
-
a[0] = x
|
|
221
|
-
assert_equal(a[0], x)
|
|
222
|
-
self.assertTrue(a[0] is x)
|
|
223
|
-
#
|
|
224
|
-
import datetime
|
|
225
|
-
dt = datetime.datetime.now()
|
|
226
|
-
a[0] = dt
|
|
227
|
-
self.assertTrue(a[0] is dt)
|
|
228
|
-
|
|
229
|
-
def test_indexing(self):
|
|
230
|
-
# Tests conversions and indexing
|
|
231
|
-
x1 = np.array([1, 2, 4, 3])
|
|
232
|
-
x2 = array(x1, mask=[1, 0, 0, 0])
|
|
233
|
-
x3 = array(x1, mask=[0, 1, 0, 1])
|
|
234
|
-
x4 = array(x1)
|
|
235
|
-
# test conversion to strings
|
|
236
|
-
junk, garbage = str(x2), repr(x2)
|
|
237
|
-
assert_equal(np.sort(x1), sort(x2, endwith=False))
|
|
238
|
-
# tests of indexing
|
|
239
|
-
assert_(type(x2[1]) is type(x1[1]))
|
|
240
|
-
assert_(x1[1] == x2[1])
|
|
241
|
-
assert_(x2[0] is masked)
|
|
242
|
-
assert_equal(x1[2], x2[2])
|
|
243
|
-
assert_equal(x1[2:5], x2[2:5])
|
|
244
|
-
assert_equal(x1[:], x2[:])
|
|
245
|
-
assert_equal(x1[1:], x3[1:])
|
|
246
|
-
x1[2] = 9
|
|
247
|
-
x2[2] = 9
|
|
248
|
-
assert_equal(x1, x2)
|
|
249
|
-
x1[1:3] = 99
|
|
250
|
-
x2[1:3] = 99
|
|
251
|
-
assert_equal(x1, x2)
|
|
252
|
-
x2[1] = masked
|
|
253
|
-
assert_equal(x1, x2)
|
|
254
|
-
x2[1:3] = masked
|
|
255
|
-
assert_equal(x1, x2)
|
|
256
|
-
x2[:] = x1
|
|
257
|
-
x2[1] = masked
|
|
258
|
-
assert_(allequal(getmask(x2), array([0, 1, 0, 0])))
|
|
259
|
-
x3[:] = masked_array([1, 2, 3, 4], [0, 1, 1, 0])
|
|
260
|
-
assert_(allequal(getmask(x3), array([0, 1, 1, 0])))
|
|
261
|
-
x4[:] = masked_array([1, 2, 3, 4], [0, 1, 1, 0])
|
|
262
|
-
assert_(allequal(getmask(x4), array([0, 1, 1, 0])))
|
|
263
|
-
assert_(allequal(x4, array([1, 2, 3, 4])))
|
|
264
|
-
x1 = np.arange(5) * 1.0
|
|
265
|
-
x2 = masked_values(x1, 3.0)
|
|
266
|
-
assert_equal(x1, x2)
|
|
267
|
-
assert_(allequal(array([0, 0, 0, 1, 0], MaskType), x2.mask))
|
|
268
|
-
assert_equal(3.0, x2.fill_value)
|
|
269
|
-
x1 = array([1, 'hello', 2, 3], object)
|
|
270
|
-
x2 = np.array([1, 'hello', 2, 3], object)
|
|
271
|
-
s1 = x1[1]
|
|
272
|
-
s2 = x2[1]
|
|
273
|
-
assert_equal(type(s2), str)
|
|
274
|
-
assert_equal(type(s1), str)
|
|
275
|
-
assert_equal(s1, s2)
|
|
276
|
-
assert_(x1[1:1].shape == (0,))
|
|
277
|
-
|
|
278
|
-
def test_copy(self):
|
|
279
|
-
# Tests of some subtle points of copying and sizing.
|
|
280
|
-
n = [0, 0, 1, 0, 0]
|
|
281
|
-
m = make_mask(n)
|
|
282
|
-
m2 = make_mask(m)
|
|
283
|
-
self.assertTrue(m is m2)
|
|
284
|
-
m3 = make_mask(m, copy=1)
|
|
285
|
-
self.assertTrue(m is not m3)
|
|
286
|
-
|
|
287
|
-
x1 = np.arange(5)
|
|
288
|
-
y1 = array(x1, mask=m)
|
|
289
|
-
#self.assertTrue( y1._data is x1)
|
|
290
|
-
assert_equal(y1._data.__array_interface__, x1.__array_interface__)
|
|
291
|
-
self.assertTrue(allequal(x1, y1.data))
|
|
292
|
-
#self.assertTrue( y1.mask is m)
|
|
293
|
-
assert_equal(y1._mask.__array_interface__, m.__array_interface__)
|
|
294
|
-
|
|
295
|
-
y1a = array(y1)
|
|
296
|
-
self.assertTrue(y1a._data.__array_interface__ ==
|
|
297
|
-
y1._data.__array_interface__)
|
|
298
|
-
self.assertTrue(y1a.mask is y1.mask)
|
|
299
|
-
|
|
300
|
-
y2 = array(x1, mask=m)
|
|
301
|
-
self.assertTrue(y2._data.__array_interface__ == x1.__array_interface__)
|
|
302
|
-
#self.assertTrue( y2.mask is m)
|
|
303
|
-
self.assertTrue(y2._mask.__array_interface__ == m.__array_interface__)
|
|
304
|
-
self.assertTrue(y2[2] is masked)
|
|
305
|
-
y2[2] = 9
|
|
306
|
-
self.assertTrue(y2[2] is not masked)
|
|
307
|
-
#self.assertTrue( y2.mask is not m)
|
|
308
|
-
self.assertTrue(y2._mask.__array_interface__ != m.__array_interface__)
|
|
309
|
-
self.assertTrue(allequal(y2.mask, 0))
|
|
310
|
-
|
|
311
|
-
y3 = array(x1 * 1.0, mask=m)
|
|
312
|
-
self.assertTrue(filled(y3).dtype is (x1 * 1.0).dtype)
|
|
313
|
-
|
|
314
|
-
x4 = arange(4)
|
|
315
|
-
x4[2] = masked
|
|
316
|
-
y4 = resize(x4, (8,))
|
|
317
|
-
assert_equal(concatenate([x4, x4]), y4)
|
|
318
|
-
assert_equal(getmask(y4), [0, 0, 1, 0, 0, 0, 1, 0])
|
|
319
|
-
y5 = repeat(x4, (2, 2, 2, 2), axis=0)
|
|
320
|
-
assert_equal(y5, [0, 0, 1, 1, 2, 2, 3, 3])
|
|
321
|
-
y6 = repeat(x4, 2, axis=0)
|
|
322
|
-
assert_equal(y5, y6)
|
|
323
|
-
y7 = x4.repeat((2, 2, 2, 2), axis=0)
|
|
324
|
-
assert_equal(y5, y7)
|
|
325
|
-
y8 = x4.repeat(2, 0)
|
|
326
|
-
assert_equal(y5, y8)
|
|
327
|
-
|
|
328
|
-
y9 = x4.copy()
|
|
329
|
-
assert_equal(y9._data, x4._data)
|
|
330
|
-
assert_equal(y9._mask, x4._mask)
|
|
331
|
-
#
|
|
332
|
-
x = masked_array([1, 2, 3], mask=[0, 1, 0])
|
|
333
|
-
# Copy is False by default
|
|
334
|
-
y = masked_array(x)
|
|
335
|
-
assert_equal(y._data.ctypes.data, x._data.ctypes.data)
|
|
336
|
-
assert_equal(y._mask.ctypes.data, x._mask.ctypes.data)
|
|
337
|
-
y = masked_array(x, copy=True)
|
|
338
|
-
assert_not_equal(y._data.ctypes.data, x._data.ctypes.data)
|
|
339
|
-
assert_not_equal(y._mask.ctypes.data, x._mask.ctypes.data)
|
|
340
|
-
|
|
341
|
-
def test_deepcopy(self):
|
|
342
|
-
from copy import deepcopy
|
|
343
|
-
a = array([0, 1, 2], mask=[False, True, False])
|
|
344
|
-
copied = deepcopy(a)
|
|
345
|
-
assert_equal(copied.mask, a.mask)
|
|
346
|
-
assert_not_equal(id(a._mask), id(copied._mask))
|
|
347
|
-
#
|
|
348
|
-
copied[1] = 1
|
|
349
|
-
assert_equal(copied.mask, [0, 0, 0])
|
|
350
|
-
assert_equal(a.mask, [0, 1, 0])
|
|
351
|
-
#
|
|
352
|
-
copied = deepcopy(a)
|
|
353
|
-
assert_equal(copied.mask, a.mask)
|
|
354
|
-
copied.mask[1] = False
|
|
355
|
-
assert_equal(copied.mask, [0, 0, 0])
|
|
356
|
-
assert_equal(a.mask, [0, 1, 0])
|
|
357
|
-
|
|
358
|
-
def test_str_repr(self):
|
|
359
|
-
a = array([0, 1, 2], mask=[False, True, False])
|
|
360
|
-
assert_equal(str(a), '[0 -- 2]')
|
|
361
|
-
assert_equal(repr(a), 'masked_array(data = [0 -- 2],\n'
|
|
362
|
-
' mask = [False True False],\n'
|
|
363
|
-
' fill_value = 999999)\n')
|
|
364
|
-
|
|
365
|
-
def test_pickling(self):
|
|
366
|
-
# Tests pickling
|
|
367
|
-
a = arange(10)
|
|
368
|
-
a[::3] = masked
|
|
369
|
-
a.fill_value = 999
|
|
370
|
-
a_pickled = pickle.loads(a.dumps())
|
|
371
|
-
assert_equal(a_pickled._mask, a._mask)
|
|
372
|
-
assert_equal(a_pickled._data, a._data)
|
|
373
|
-
assert_equal(a_pickled.fill_value, 999)
|
|
374
|
-
|
|
375
|
-
def test_pickling_subbaseclass(self):
|
|
376
|
-
# Test pickling w/ a subclass of ndarray
|
|
377
|
-
a = array(np.matrix(list(range(10))), mask=[1, 0, 1, 0, 0] * 2)
|
|
378
|
-
a_pickled = pickle.loads(a.dumps())
|
|
379
|
-
assert_equal(a_pickled._mask, a._mask)
|
|
380
|
-
assert_equal(a_pickled, a)
|
|
381
|
-
self.assertTrue(isinstance(a_pickled._data, np.matrix))
|
|
382
|
-
|
|
383
|
-
def test_pickling_maskedconstant(self):
|
|
384
|
-
# Test pickling MaskedConstant
|
|
385
|
-
mc = np.ma.masked
|
|
386
|
-
mc_pickled = pickle.loads(mc.dumps())
|
|
387
|
-
assert_equal(mc_pickled._baseclass, mc._baseclass)
|
|
388
|
-
assert_equal(mc_pickled._mask, mc._mask)
|
|
389
|
-
assert_equal(mc_pickled._data, mc._data)
|
|
390
|
-
|
|
391
|
-
def test_pickling_wstructured(self):
|
|
392
|
-
# Tests pickling w/ structured array
|
|
393
|
-
a = array([(1, 1.), (2, 2.)], mask=[(0, 0), (0, 1)],
|
|
394
|
-
dtype=[('a', int), ('b', float)])
|
|
395
|
-
a_pickled = pickle.loads(a.dumps())
|
|
396
|
-
assert_equal(a_pickled._mask, a._mask)
|
|
397
|
-
assert_equal(a_pickled, a)
|
|
398
|
-
|
|
399
|
-
def test_pickling_keepalignment(self):
|
|
400
|
-
# Tests pickling w/ F_CONTIGUOUS arrays
|
|
401
|
-
a = arange(10)
|
|
402
|
-
a.shape = (-1, 2)
|
|
403
|
-
b = a.T
|
|
404
|
-
test = pickle.loads(pickle.dumps(b))
|
|
405
|
-
assert_equal(test, b)
|
|
406
|
-
|
|
407
|
-
def test_single_element_subscript(self):
|
|
408
|
-
# Tests single element subscripts of Maskedarrays.
|
|
409
|
-
a = array([1, 3, 2])
|
|
410
|
-
b = array([1, 3, 2], mask=[1, 0, 1])
|
|
411
|
-
assert_equal(a[0].shape, ())
|
|
412
|
-
assert_equal(b[0].shape, ())
|
|
413
|
-
assert_equal(b[1].shape, ())
|
|
414
|
-
|
|
415
|
-
def test_topython(self):
|
|
416
|
-
# Tests some communication issues with Python.
|
|
417
|
-
assert_equal(1, int(array(1)))
|
|
418
|
-
assert_equal(1.0, float(array(1)))
|
|
419
|
-
assert_equal(1, int(array([[[1]]])))
|
|
420
|
-
assert_equal(1.0, float(array([[1]])))
|
|
421
|
-
self.assertRaises(TypeError, float, array([1, 1]))
|
|
422
|
-
#
|
|
423
|
-
with warnings.catch_warnings():
|
|
424
|
-
warnings.simplefilter('ignore', UserWarning)
|
|
425
|
-
assert_(np.isnan(float(array([1], mask=[1]))))
|
|
426
|
-
#
|
|
427
|
-
a = array([1, 2, 3], mask=[1, 0, 0])
|
|
428
|
-
self.assertRaises(TypeError, lambda:float(a))
|
|
429
|
-
assert_equal(float(a[-1]), 3.)
|
|
430
|
-
self.assertTrue(np.isnan(float(a[0])))
|
|
431
|
-
self.assertRaises(TypeError, int, a)
|
|
432
|
-
assert_equal(int(a[-1]), 3)
|
|
433
|
-
self.assertRaises(MAError, lambda:int(a[0]))
|
|
434
|
-
|
|
435
|
-
def test_oddfeatures_1(self):
|
|
436
|
-
# Test of other odd features
|
|
437
|
-
x = arange(20)
|
|
438
|
-
x = x.reshape(4, 5)
|
|
439
|
-
x.flat[5] = 12
|
|
440
|
-
assert_(x[1, 0] == 12)
|
|
441
|
-
z = x + 10j * x
|
|
442
|
-
assert_equal(z.real, x)
|
|
443
|
-
assert_equal(z.imag, 10 * x)
|
|
444
|
-
assert_equal((z * conjugate(z)).real, 101 * x * x)
|
|
445
|
-
z.imag[...] = 0.0
|
|
446
|
-
#
|
|
447
|
-
x = arange(10)
|
|
448
|
-
x[3] = masked
|
|
449
|
-
assert_(str(x[3]) == str(masked))
|
|
450
|
-
c = x >= 8
|
|
451
|
-
assert_(count(where(c, masked, masked)) == 0)
|
|
452
|
-
assert_(shape(where(c, masked, masked)) == c.shape)
|
|
453
|
-
#
|
|
454
|
-
z = masked_where(c, x)
|
|
455
|
-
assert_(z.dtype is x.dtype)
|
|
456
|
-
assert_(z[3] is masked)
|
|
457
|
-
assert_(z[4] is not masked)
|
|
458
|
-
assert_(z[7] is not masked)
|
|
459
|
-
assert_(z[8] is masked)
|
|
460
|
-
assert_(z[9] is masked)
|
|
461
|
-
assert_equal(x, z)
|
|
462
|
-
|
|
463
|
-
def test_oddfeatures_2(self):
|
|
464
|
-
# Tests some more features.
|
|
465
|
-
x = array([1., 2., 3., 4., 5.])
|
|
466
|
-
c = array([1, 1, 1, 0, 0])
|
|
467
|
-
x[2] = masked
|
|
468
|
-
z = where(c, x, -x)
|
|
469
|
-
assert_equal(z, [1., 2., 0., -4., -5])
|
|
470
|
-
c[0] = masked
|
|
471
|
-
z = where(c, x, -x)
|
|
472
|
-
assert_equal(z, [1., 2., 0., -4., -5])
|
|
473
|
-
assert_(z[0] is masked)
|
|
474
|
-
assert_(z[1] is not masked)
|
|
475
|
-
assert_(z[2] is masked)
|
|
476
|
-
|
|
477
|
-
def test_oddfeatures_3(self):
|
|
478
|
-
# Tests some generic features
|
|
479
|
-
atest = array([10], mask=True)
|
|
480
|
-
btest = array([20])
|
|
481
|
-
idx = atest.mask
|
|
482
|
-
atest[idx] = btest[idx]
|
|
483
|
-
assert_equal(atest, [20])
|
|
484
|
-
|
|
485
|
-
def test_filled_w_object_dtype(self):
|
|
486
|
-
a = np.ma.masked_all(1, dtype='O')
|
|
487
|
-
assert_equal(a.filled('x')[0], 'x')
|
|
488
|
-
|
|
489
|
-
def test_filled_w_flexible_dtype(self):
|
|
490
|
-
# Test filled w/ flexible dtype
|
|
491
|
-
flexi = array([(1, 1, 1)],
|
|
492
|
-
dtype=[('i', int), ('s', '|S8'), ('f', float)])
|
|
493
|
-
flexi[0] = masked
|
|
494
|
-
assert_equal(flexi.filled(),
|
|
495
|
-
np.array([(default_fill_value(0),
|
|
496
|
-
default_fill_value('0'),
|
|
497
|
-
default_fill_value(0.),)], dtype=flexi.dtype))
|
|
498
|
-
flexi[0] = masked
|
|
499
|
-
assert_equal(flexi.filled(1),
|
|
500
|
-
np.array([(1, '1', 1.)], dtype=flexi.dtype))
|
|
501
|
-
|
|
502
|
-
def test_filled_w_mvoid(self):
|
|
503
|
-
# Test filled w/ mvoid
|
|
504
|
-
ndtype = [('a', int), ('b', float)]
|
|
505
|
-
a = mvoid((1, 2.), mask=[(0, 1)], dtype=ndtype)
|
|
506
|
-
# Filled using default
|
|
507
|
-
test = a.filled()
|
|
508
|
-
assert_equal(tuple(test), (1, default_fill_value(1.)))
|
|
509
|
-
# Explicit fill_value
|
|
510
|
-
test = a.filled((-1, -1))
|
|
511
|
-
assert_equal(tuple(test), (1, -1))
|
|
512
|
-
# Using predefined filling values
|
|
513
|
-
a.fill_value = (-999, -999)
|
|
514
|
-
assert_equal(tuple(a.filled()), (1, -999))
|
|
515
|
-
|
|
516
|
-
def test_filled_w_nested_dtype(self):
|
|
517
|
-
# Test filled w/ nested dtype
|
|
518
|
-
ndtype = [('A', int), ('B', [('BA', int), ('BB', int)])]
|
|
519
|
-
a = array([(1, (1, 1)), (2, (2, 2))],
|
|
520
|
-
mask=[(0, (1, 0)), (0, (0, 1))], dtype=ndtype)
|
|
521
|
-
test = a.filled(0)
|
|
522
|
-
control = np.array([(1, (0, 1)), (2, (2, 0))], dtype=ndtype)
|
|
523
|
-
assert_equal(test, control)
|
|
524
|
-
#
|
|
525
|
-
test = a['B'].filled(0)
|
|
526
|
-
control = np.array([(0, 1), (2, 0)], dtype=a['B'].dtype)
|
|
527
|
-
assert_equal(test, control)
|
|
528
|
-
|
|
529
|
-
def test_filled_w_f_order(self):
|
|
530
|
-
# Test filled w/ F-contiguous array
|
|
531
|
-
a = array(np.array([(0, 1, 2), (4, 5, 6)], order='F'),
|
|
532
|
-
mask=np.array([(0, 0, 1), (1, 0, 0)], order='F'),
|
|
533
|
-
order='F') # this is currently ignored
|
|
534
|
-
self.assertTrue(a.flags['F_CONTIGUOUS'])
|
|
535
|
-
self.assertTrue(a.filled(0).flags['F_CONTIGUOUS'])
|
|
536
|
-
|
|
537
|
-
def test_optinfo_propagation(self):
|
|
538
|
-
# Checks that _optinfo dictionary isn't back-propagated
|
|
539
|
-
x = array([1, 2, 3, ], dtype=float)
|
|
540
|
-
x._optinfo['info'] = '???'
|
|
541
|
-
y = x.copy()
|
|
542
|
-
assert_equal(y._optinfo['info'], '???')
|
|
543
|
-
y._optinfo['info'] = '!!!'
|
|
544
|
-
assert_equal(x._optinfo['info'], '???')
|
|
545
|
-
|
|
546
|
-
def test_fancy_printoptions(self):
|
|
547
|
-
# Test printing a masked array w/ fancy dtype.
|
|
548
|
-
fancydtype = np.dtype([('x', int), ('y', [('t', int), ('s', float)])])
|
|
549
|
-
test = array([(1, (2, 3.0)), (4, (5, 6.0))],
|
|
550
|
-
mask=[(1, (0, 1)), (0, (1, 0))],
|
|
551
|
-
dtype=fancydtype)
|
|
552
|
-
control = "[(--, (2, --)) (4, (--, 6.0))]"
|
|
553
|
-
assert_equal(str(test), control)
|
|
554
|
-
|
|
555
|
-
def test_flatten_structured_array(self):
|
|
556
|
-
# Test flatten_structured_array on arrays
|
|
557
|
-
# On ndarray
|
|
558
|
-
ndtype = [('a', int), ('b', float)]
|
|
559
|
-
a = np.array([(1, 1), (2, 2)], dtype=ndtype)
|
|
560
|
-
test = flatten_structured_array(a)
|
|
561
|
-
control = np.array([[1., 1.], [2., 2.]], dtype=np.float)
|
|
562
|
-
assert_equal(test, control)
|
|
563
|
-
assert_equal(test.dtype, control.dtype)
|
|
564
|
-
# On masked_array
|
|
565
|
-
a = array([(1, 1), (2, 2)], mask=[(0, 1), (1, 0)], dtype=ndtype)
|
|
566
|
-
test = flatten_structured_array(a)
|
|
567
|
-
control = array([[1., 1.], [2., 2.]],
|
|
568
|
-
mask=[[0, 1], [1, 0]], dtype=np.float)
|
|
569
|
-
assert_equal(test, control)
|
|
570
|
-
assert_equal(test.dtype, control.dtype)
|
|
571
|
-
assert_equal(test.mask, control.mask)
|
|
572
|
-
# On masked array with nested structure
|
|
573
|
-
ndtype = [('a', int), ('b', [('ba', int), ('bb', float)])]
|
|
574
|
-
a = array([(1, (1, 1.1)), (2, (2, 2.2))],
|
|
575
|
-
mask=[(0, (1, 0)), (1, (0, 1))], dtype=ndtype)
|
|
576
|
-
test = flatten_structured_array(a)
|
|
577
|
-
control = array([[1., 1., 1.1], [2., 2., 2.2]],
|
|
578
|
-
mask=[[0, 1, 0], [1, 0, 1]], dtype=np.float)
|
|
579
|
-
assert_equal(test, control)
|
|
580
|
-
assert_equal(test.dtype, control.dtype)
|
|
581
|
-
assert_equal(test.mask, control.mask)
|
|
582
|
-
# Keeping the initial shape
|
|
583
|
-
ndtype = [('a', int), ('b', float)]
|
|
584
|
-
a = np.array([[(1, 1), ], [(2, 2), ]], dtype=ndtype)
|
|
585
|
-
test = flatten_structured_array(a)
|
|
586
|
-
control = np.array([[[1., 1.], ], [[2., 2.], ]], dtype=np.float)
|
|
587
|
-
assert_equal(test, control)
|
|
588
|
-
assert_equal(test.dtype, control.dtype)
|
|
589
|
-
|
|
590
|
-
def test_void0d(self):
|
|
591
|
-
# Test creating a mvoid object
|
|
592
|
-
ndtype = [('a', int), ('b', int)]
|
|
593
|
-
a = np.array([(1, 2,)], dtype=ndtype)[0]
|
|
594
|
-
f = mvoid(a)
|
|
595
|
-
assert_(isinstance(f, mvoid))
|
|
596
|
-
#
|
|
597
|
-
a = masked_array([(1, 2)], mask=[(1, 0)], dtype=ndtype)[0]
|
|
598
|
-
assert_(isinstance(a, mvoid))
|
|
599
|
-
#
|
|
600
|
-
a = masked_array([(1, 2), (1, 2)], mask=[(1, 0), (0, 0)], dtype=ndtype)
|
|
601
|
-
f = mvoid(a._data[0], a._mask[0])
|
|
602
|
-
assert_(isinstance(f, mvoid))
|
|
603
|
-
|
|
604
|
-
def test_mvoid_getitem(self):
|
|
605
|
-
# Test mvoid.__getitem__
|
|
606
|
-
ndtype = [('a', int), ('b', int)]
|
|
607
|
-
a = masked_array([(1, 2,), (3, 4)], mask=[(0, 0), (1, 0)],
|
|
608
|
-
dtype=ndtype)
|
|
609
|
-
# w/o mask
|
|
610
|
-
f = a[0]
|
|
611
|
-
self.assertTrue(isinstance(f, mvoid))
|
|
612
|
-
assert_equal((f[0], f['a']), (1, 1))
|
|
613
|
-
assert_equal(f['b'], 2)
|
|
614
|
-
# w/ mask
|
|
615
|
-
f = a[1]
|
|
616
|
-
self.assertTrue(isinstance(f, mvoid))
|
|
617
|
-
self.assertTrue(f[0] is masked)
|
|
618
|
-
self.assertTrue(f['a'] is masked)
|
|
619
|
-
assert_equal(f[1], 4)
|
|
620
|
-
|
|
621
|
-
def test_mvoid_iter(self):
|
|
622
|
-
# Test iteration on __getitem__
|
|
623
|
-
ndtype = [('a', int), ('b', int)]
|
|
624
|
-
a = masked_array([(1, 2,), (3, 4)], mask=[(0, 0), (1, 0)],
|
|
625
|
-
dtype=ndtype)
|
|
626
|
-
# w/o mask
|
|
627
|
-
assert_equal(list(a[0]), [1, 2])
|
|
628
|
-
# w/ mask
|
|
629
|
-
assert_equal(list(a[1]), [masked, 4])
|
|
630
|
-
|
|
631
|
-
def test_mvoid_print(self):
|
|
632
|
-
# Test printing a mvoid
|
|
633
|
-
mx = array([(1, 1), (2, 2)], dtype=[('a', int), ('b', int)])
|
|
634
|
-
assert_equal(str(mx[0]), "(1, 1)")
|
|
635
|
-
mx['b'][0] = masked
|
|
636
|
-
ini_display = masked_print_option._display
|
|
637
|
-
masked_print_option.set_display("-X-")
|
|
638
|
-
try:
|
|
639
|
-
assert_equal(str(mx[0]), "(1, -X-)")
|
|
640
|
-
assert_equal(repr(mx[0]), "(1, -X-)")
|
|
641
|
-
finally:
|
|
642
|
-
masked_print_option.set_display(ini_display)
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
#------------------------------------------------------------------------------
|
|
646
|
-
class TestMaskedArrayArithmetic(TestCase):
|
|
647
|
-
# Base test class for MaskedArrays.
|
|
648
|
-
|
|
649
|
-
def setUp(self):
|
|
650
|
-
# Base data definition.
|
|
651
|
-
x = np.array([1., 1., 1., -2., pi/2.0, 4., 5., -10., 10., 1., 2., 3.])
|
|
652
|
-
y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.])
|
|
653
|
-
a10 = 10.
|
|
654
|
-
m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
|
655
|
-
m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
|
|
656
|
-
xm = masked_array(x, mask=m1)
|
|
657
|
-
ym = masked_array(y, mask=m2)
|
|
658
|
-
z = np.array([-.5, 0., .5, .8])
|
|
659
|
-
zm = masked_array(z, mask=[0, 1, 0, 0])
|
|
660
|
-
xf = np.where(m1, 1e+20, x)
|
|
661
|
-
xm.set_fill_value(1e+20)
|
|
662
|
-
self.d = (x, y, a10, m1, m2, xm, ym, z, zm, xf)
|
|
663
|
-
self.err_status = np.geterr()
|
|
664
|
-
np.seterr(divide='ignore', invalid='ignore')
|
|
665
|
-
|
|
666
|
-
def tearDown(self):
|
|
667
|
-
np.seterr(**self.err_status)
|
|
668
|
-
|
|
669
|
-
def test_basic_arithmetic(self):
|
|
670
|
-
# Test of basic arithmetic.
|
|
671
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
672
|
-
a2d = array([[1, 2], [0, 4]])
|
|
673
|
-
a2dm = masked_array(a2d, [[0, 0], [1, 0]])
|
|
674
|
-
assert_equal(a2d * a2d, a2d * a2dm)
|
|
675
|
-
assert_equal(a2d + a2d, a2d + a2dm)
|
|
676
|
-
assert_equal(a2d - a2d, a2d - a2dm)
|
|
677
|
-
for s in [(12,), (4, 3), (2, 6)]:
|
|
678
|
-
x = x.reshape(s)
|
|
679
|
-
y = y.reshape(s)
|
|
680
|
-
xm = xm.reshape(s)
|
|
681
|
-
ym = ym.reshape(s)
|
|
682
|
-
xf = xf.reshape(s)
|
|
683
|
-
assert_equal(-x, -xm)
|
|
684
|
-
assert_equal(x + y, xm + ym)
|
|
685
|
-
assert_equal(x - y, xm - ym)
|
|
686
|
-
assert_equal(x * y, xm * ym)
|
|
687
|
-
assert_equal(x / y, xm / ym)
|
|
688
|
-
assert_equal(a10 + y, a10 + ym)
|
|
689
|
-
assert_equal(a10 - y, a10 - ym)
|
|
690
|
-
assert_equal(a10 * y, a10 * ym)
|
|
691
|
-
assert_equal(a10 / y, a10 / ym)
|
|
692
|
-
assert_equal(x + a10, xm + a10)
|
|
693
|
-
assert_equal(x - a10, xm - a10)
|
|
694
|
-
assert_equal(x * a10, xm * a10)
|
|
695
|
-
assert_equal(x / a10, xm / a10)
|
|
696
|
-
assert_equal(x ** 2, xm ** 2)
|
|
697
|
-
assert_equal(abs(x) ** 2.5, abs(xm) ** 2.5)
|
|
698
|
-
assert_equal(x ** y, xm ** ym)
|
|
699
|
-
assert_equal(np.add(x, y), add(xm, ym))
|
|
700
|
-
assert_equal(np.subtract(x, y), subtract(xm, ym))
|
|
701
|
-
assert_equal(np.multiply(x, y), multiply(xm, ym))
|
|
702
|
-
assert_equal(np.divide(x, y), divide(xm, ym))
|
|
703
|
-
|
|
704
|
-
def test_divide_on_different_shapes(self):
|
|
705
|
-
x = arange(6, dtype=float)
|
|
706
|
-
x.shape = (2, 3)
|
|
707
|
-
y = arange(3, dtype=float)
|
|
708
|
-
#
|
|
709
|
-
z = x / y
|
|
710
|
-
assert_equal(z, [[-1., 1., 1.], [-1., 4., 2.5]])
|
|
711
|
-
assert_equal(z.mask, [[1, 0, 0], [1, 0, 0]])
|
|
712
|
-
#
|
|
713
|
-
z = x / y[None,:]
|
|
714
|
-
assert_equal(z, [[-1., 1., 1.], [-1., 4., 2.5]])
|
|
715
|
-
assert_equal(z.mask, [[1, 0, 0], [1, 0, 0]])
|
|
716
|
-
#
|
|
717
|
-
y = arange(2, dtype=float)
|
|
718
|
-
z = x / y[:, None]
|
|
719
|
-
assert_equal(z, [[-1., -1., -1.], [3., 4., 5.]])
|
|
720
|
-
assert_equal(z.mask, [[1, 1, 1], [0, 0, 0]])
|
|
721
|
-
|
|
722
|
-
def test_mixed_arithmetic(self):
|
|
723
|
-
# Tests mixed arithmetics.
|
|
724
|
-
na = np.array([1])
|
|
725
|
-
ma = array([1])
|
|
726
|
-
self.assertTrue(isinstance(na + ma, MaskedArray))
|
|
727
|
-
self.assertTrue(isinstance(ma + na, MaskedArray))
|
|
728
|
-
|
|
729
|
-
def test_limits_arithmetic(self):
|
|
730
|
-
tiny = np.finfo(float).tiny
|
|
731
|
-
a = array([tiny, 1. / tiny, 0.])
|
|
732
|
-
assert_equal(getmaskarray(a / 2), [0, 0, 0])
|
|
733
|
-
assert_equal(getmaskarray(2 / a), [1, 0, 1])
|
|
734
|
-
|
|
735
|
-
def test_masked_singleton_arithmetic(self):
|
|
736
|
-
# Tests some scalar arithmetics on MaskedArrays.
|
|
737
|
-
# Masked singleton should remain masked no matter what
|
|
738
|
-
xm = array(0, mask=1)
|
|
739
|
-
self.assertTrue((1 / array(0)).mask)
|
|
740
|
-
self.assertTrue((1 + xm).mask)
|
|
741
|
-
self.assertTrue((-xm).mask)
|
|
742
|
-
self.assertTrue(maximum(xm, xm).mask)
|
|
743
|
-
self.assertTrue(minimum(xm, xm).mask)
|
|
744
|
-
|
|
745
|
-
def test_masked_singleton_equality(self):
|
|
746
|
-
# Tests (in)equality on masked snigleton
|
|
747
|
-
a = array([1, 2, 3], mask=[1, 1, 0])
|
|
748
|
-
assert_((a[0] == 0) is masked)
|
|
749
|
-
assert_((a[0] != 0) is masked)
|
|
750
|
-
assert_equal((a[-1] == 0), False)
|
|
751
|
-
assert_equal((a[-1] != 0), True)
|
|
752
|
-
|
|
753
|
-
def test_arithmetic_with_masked_singleton(self):
|
|
754
|
-
# Checks that there's no collapsing to masked
|
|
755
|
-
x = masked_array([1, 2])
|
|
756
|
-
y = x * masked
|
|
757
|
-
assert_equal(y.shape, x.shape)
|
|
758
|
-
assert_equal(y._mask, [True, True])
|
|
759
|
-
y = x[0] * masked
|
|
760
|
-
assert_(y is masked)
|
|
761
|
-
y = x + masked
|
|
762
|
-
assert_equal(y.shape, x.shape)
|
|
763
|
-
assert_equal(y._mask, [True, True])
|
|
764
|
-
|
|
765
|
-
def test_arithmetic_with_masked_singleton_on_1d_singleton(self):
|
|
766
|
-
# Check that we're not losing the shape of a singleton
|
|
767
|
-
x = masked_array([1, ])
|
|
768
|
-
y = x + masked
|
|
769
|
-
assert_equal(y.shape, x.shape)
|
|
770
|
-
assert_equal(y.mask, [True, ])
|
|
771
|
-
|
|
772
|
-
def test_scalar_arithmetic(self):
|
|
773
|
-
x = array(0, mask=0)
|
|
774
|
-
assert_equal(x.filled().ctypes.data, x.ctypes.data)
|
|
775
|
-
# Make sure we don't lose the shape in some circumstances
|
|
776
|
-
xm = array((0, 0)) / 0.
|
|
777
|
-
assert_equal(xm.shape, (2,))
|
|
778
|
-
assert_equal(xm.mask, [1, 1])
|
|
779
|
-
|
|
780
|
-
def test_basic_ufuncs(self):
|
|
781
|
-
# Test various functions such as sin, cos.
|
|
782
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
783
|
-
assert_equal(np.cos(x), cos(xm))
|
|
784
|
-
assert_equal(np.cosh(x), cosh(xm))
|
|
785
|
-
assert_equal(np.sin(x), sin(xm))
|
|
786
|
-
assert_equal(np.sinh(x), sinh(xm))
|
|
787
|
-
assert_equal(np.tan(x), tan(xm))
|
|
788
|
-
assert_equal(np.tanh(x), tanh(xm))
|
|
789
|
-
assert_equal(np.sqrt(abs(x)), sqrt(xm))
|
|
790
|
-
assert_equal(np.log(abs(x)), log(xm))
|
|
791
|
-
assert_equal(np.log10(abs(x)), log10(xm))
|
|
792
|
-
assert_equal(np.exp(x), exp(xm))
|
|
793
|
-
assert_equal(np.arcsin(z), arcsin(zm))
|
|
794
|
-
assert_equal(np.arccos(z), arccos(zm))
|
|
795
|
-
assert_equal(np.arctan(z), arctan(zm))
|
|
796
|
-
assert_equal(np.arctan2(x, y), arctan2(xm, ym))
|
|
797
|
-
assert_equal(np.absolute(x), absolute(xm))
|
|
798
|
-
assert_equal(np.angle(x + 1j*y), angle(xm + 1j*ym))
|
|
799
|
-
assert_equal(np.angle(x + 1j*y, deg=True), angle(xm + 1j*ym, deg=True))
|
|
800
|
-
assert_equal(np.equal(x, y), equal(xm, ym))
|
|
801
|
-
assert_equal(np.not_equal(x, y), not_equal(xm, ym))
|
|
802
|
-
assert_equal(np.less(x, y), less(xm, ym))
|
|
803
|
-
assert_equal(np.greater(x, y), greater(xm, ym))
|
|
804
|
-
assert_equal(np.less_equal(x, y), less_equal(xm, ym))
|
|
805
|
-
assert_equal(np.greater_equal(x, y), greater_equal(xm, ym))
|
|
806
|
-
assert_equal(np.conjugate(x), conjugate(xm))
|
|
807
|
-
|
|
808
|
-
def test_count_func(self):
|
|
809
|
-
# Tests count
|
|
810
|
-
assert_equal(1, count(1))
|
|
811
|
-
assert_equal(0, array(1, mask=[1]))
|
|
812
|
-
|
|
813
|
-
ott = array([0., 1., 2., 3.], mask=[1, 0, 0, 0])
|
|
814
|
-
res = count(ott)
|
|
815
|
-
self.assertTrue(res.dtype.type is np.intp)
|
|
816
|
-
assert_equal(3, res)
|
|
817
|
-
|
|
818
|
-
ott = ott.reshape((2, 2))
|
|
819
|
-
res = count(ott)
|
|
820
|
-
assert_(res.dtype.type is np.intp)
|
|
821
|
-
assert_equal(3, res)
|
|
822
|
-
res = count(ott, 0)
|
|
823
|
-
assert_(isinstance(res, ndarray))
|
|
824
|
-
assert_equal([1, 2], res)
|
|
825
|
-
assert_(getmask(res) is nomask)
|
|
826
|
-
|
|
827
|
-
ott= array([0., 1., 2., 3.])
|
|
828
|
-
res = count(ott, 0)
|
|
829
|
-
assert_(isinstance(res, ndarray))
|
|
830
|
-
assert_(res.dtype.type is np.intp)
|
|
831
|
-
|
|
832
|
-
assert_raises(IndexError, ott.count, 1)
|
|
833
|
-
|
|
834
|
-
def test_minmax_func(self):
|
|
835
|
-
# Tests minimum and maximum.
|
|
836
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
837
|
-
# max doesn't work if shaped
|
|
838
|
-
xr = np.ravel(x)
|
|
839
|
-
xmr = ravel(xm)
|
|
840
|
-
# following are true because of careful selection of data
|
|
841
|
-
assert_equal(max(xr), maximum(xmr))
|
|
842
|
-
assert_equal(min(xr), minimum(xmr))
|
|
843
|
-
#
|
|
844
|
-
assert_equal(minimum([1, 2, 3], [4, 0, 9]), [1, 0, 3])
|
|
845
|
-
assert_equal(maximum([1, 2, 3], [4, 0, 9]), [4, 2, 9])
|
|
846
|
-
x = arange(5)
|
|
847
|
-
y = arange(5) - 2
|
|
848
|
-
x[3] = masked
|
|
849
|
-
y[0] = masked
|
|
850
|
-
assert_equal(minimum(x, y), where(less(x, y), x, y))
|
|
851
|
-
assert_equal(maximum(x, y), where(greater(x, y), x, y))
|
|
852
|
-
assert_(minimum(x) == 0)
|
|
853
|
-
assert_(maximum(x) == 4)
|
|
854
|
-
#
|
|
855
|
-
x = arange(4).reshape(2, 2)
|
|
856
|
-
x[-1, -1] = masked
|
|
857
|
-
assert_equal(maximum(x), 2)
|
|
858
|
-
|
|
859
|
-
def test_minimummaximum_func(self):
|
|
860
|
-
a = np.ones((2, 2))
|
|
861
|
-
aminimum = minimum(a, a)
|
|
862
|
-
self.assertTrue(isinstance(aminimum, MaskedArray))
|
|
863
|
-
assert_equal(aminimum, np.minimum(a, a))
|
|
864
|
-
#
|
|
865
|
-
aminimum = minimum.outer(a, a)
|
|
866
|
-
self.assertTrue(isinstance(aminimum, MaskedArray))
|
|
867
|
-
assert_equal(aminimum, np.minimum.outer(a, a))
|
|
868
|
-
#
|
|
869
|
-
amaximum = maximum(a, a)
|
|
870
|
-
self.assertTrue(isinstance(amaximum, MaskedArray))
|
|
871
|
-
assert_equal(amaximum, np.maximum(a, a))
|
|
872
|
-
#
|
|
873
|
-
amaximum = maximum.outer(a, a)
|
|
874
|
-
self.assertTrue(isinstance(amaximum, MaskedArray))
|
|
875
|
-
assert_equal(amaximum, np.maximum.outer(a, a))
|
|
876
|
-
|
|
877
|
-
def test_minmax_reduce(self):
|
|
878
|
-
# Test np.min/maximum.reduce on array w/ full False mask
|
|
879
|
-
a = array([1, 2, 3], mask=[False, False, False])
|
|
880
|
-
b = np.maximum.reduce(a)
|
|
881
|
-
assert_equal(b, 3)
|
|
882
|
-
|
|
883
|
-
def test_minmax_funcs_with_output(self):
|
|
884
|
-
# Tests the min/max functions with explicit outputs
|
|
885
|
-
mask = np.random.rand(12).round()
|
|
886
|
-
xm = array(np.random.uniform(0, 10, 12), mask=mask)
|
|
887
|
-
xm.shape = (3, 4)
|
|
888
|
-
for funcname in ('min', 'max'):
|
|
889
|
-
# Initialize
|
|
890
|
-
npfunc = getattr(np, funcname)
|
|
891
|
-
mafunc = getattr(numpy.ma.core, funcname)
|
|
892
|
-
# Use the np version
|
|
893
|
-
nout = np.empty((4,), dtype=int)
|
|
894
|
-
try:
|
|
895
|
-
result = npfunc(xm, axis=0, out=nout)
|
|
896
|
-
except MaskError:
|
|
897
|
-
pass
|
|
898
|
-
nout = np.empty((4,), dtype=float)
|
|
899
|
-
result = npfunc(xm, axis=0, out=nout)
|
|
900
|
-
self.assertTrue(result is nout)
|
|
901
|
-
# Use the ma version
|
|
902
|
-
nout.fill(-999)
|
|
903
|
-
result = mafunc(xm, axis=0, out=nout)
|
|
904
|
-
self.assertTrue(result is nout)
|
|
905
|
-
|
|
906
|
-
def test_minmax_methods(self):
|
|
907
|
-
# Additional tests on max/min
|
|
908
|
-
(_, _, _, _, _, xm, _, _, _, _) = self.d
|
|
909
|
-
xm.shape = (xm.size,)
|
|
910
|
-
assert_equal(xm.max(), 10)
|
|
911
|
-
self.assertTrue(xm[0].max() is masked)
|
|
912
|
-
self.assertTrue(xm[0].max(0) is masked)
|
|
913
|
-
self.assertTrue(xm[0].max(-1) is masked)
|
|
914
|
-
assert_equal(xm.min(), -10.)
|
|
915
|
-
self.assertTrue(xm[0].min() is masked)
|
|
916
|
-
self.assertTrue(xm[0].min(0) is masked)
|
|
917
|
-
self.assertTrue(xm[0].min(-1) is masked)
|
|
918
|
-
assert_equal(xm.ptp(), 20.)
|
|
919
|
-
self.assertTrue(xm[0].ptp() is masked)
|
|
920
|
-
self.assertTrue(xm[0].ptp(0) is masked)
|
|
921
|
-
self.assertTrue(xm[0].ptp(-1) is masked)
|
|
922
|
-
#
|
|
923
|
-
x = array([1, 2, 3], mask=True)
|
|
924
|
-
self.assertTrue(x.min() is masked)
|
|
925
|
-
self.assertTrue(x.max() is masked)
|
|
926
|
-
self.assertTrue(x.ptp() is masked)
|
|
927
|
-
|
|
928
|
-
def test_addsumprod(self):
|
|
929
|
-
# Tests add, sum, product.
|
|
930
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
931
|
-
assert_equal(np.add.reduce(x), add.reduce(x))
|
|
932
|
-
assert_equal(np.add.accumulate(x), add.accumulate(x))
|
|
933
|
-
assert_equal(4, sum(array(4), axis=0))
|
|
934
|
-
assert_equal(4, sum(array(4), axis=0))
|
|
935
|
-
assert_equal(np.sum(x, axis=0), sum(x, axis=0))
|
|
936
|
-
assert_equal(np.sum(filled(xm, 0), axis=0), sum(xm, axis=0))
|
|
937
|
-
assert_equal(np.sum(x, 0), sum(x, 0))
|
|
938
|
-
assert_equal(np.product(x, axis=0), product(x, axis=0))
|
|
939
|
-
assert_equal(np.product(x, 0), product(x, 0))
|
|
940
|
-
assert_equal(np.product(filled(xm, 1), axis=0), product(xm, axis=0))
|
|
941
|
-
s = (3, 4)
|
|
942
|
-
x.shape = y.shape = xm.shape = ym.shape = s
|
|
943
|
-
if len(s) > 1:
|
|
944
|
-
assert_equal(np.concatenate((x, y), 1), concatenate((xm, ym), 1))
|
|
945
|
-
assert_equal(np.add.reduce(x, 1), add.reduce(x, 1))
|
|
946
|
-
assert_equal(np.sum(x, 1), sum(x, 1))
|
|
947
|
-
assert_equal(np.product(x, 1), product(x, 1))
|
|
948
|
-
|
|
949
|
-
def test_binops_d2D(self):
|
|
950
|
-
# Test binary operations on 2D data
|
|
951
|
-
a = array([[1.], [2.], [3.]], mask=[[False], [True], [True]])
|
|
952
|
-
b = array([[2., 3.], [4., 5.], [6., 7.]])
|
|
953
|
-
#
|
|
954
|
-
test = a * b
|
|
955
|
-
control = array([[2., 3.], [2., 2.], [3., 3.]],
|
|
956
|
-
mask=[[0, 0], [1, 1], [1, 1]])
|
|
957
|
-
assert_equal(test, control)
|
|
958
|
-
assert_equal(test.data, control.data)
|
|
959
|
-
assert_equal(test.mask, control.mask)
|
|
960
|
-
#
|
|
961
|
-
test = b * a
|
|
962
|
-
control = array([[2., 3.], [4., 5.], [6., 7.]],
|
|
963
|
-
mask=[[0, 0], [1, 1], [1, 1]])
|
|
964
|
-
assert_equal(test, control)
|
|
965
|
-
assert_equal(test.data, control.data)
|
|
966
|
-
assert_equal(test.mask, control.mask)
|
|
967
|
-
#
|
|
968
|
-
a = array([[1.], [2.], [3.]])
|
|
969
|
-
b = array([[2., 3.], [4., 5.], [6., 7.]],
|
|
970
|
-
mask=[[0, 0], [0, 0], [0, 1]])
|
|
971
|
-
test = a * b
|
|
972
|
-
control = array([[2, 3], [8, 10], [18, 3]],
|
|
973
|
-
mask=[[0, 0], [0, 0], [0, 1]])
|
|
974
|
-
assert_equal(test, control)
|
|
975
|
-
assert_equal(test.data, control.data)
|
|
976
|
-
assert_equal(test.mask, control.mask)
|
|
977
|
-
#
|
|
978
|
-
test = b * a
|
|
979
|
-
control = array([[2, 3], [8, 10], [18, 7]],
|
|
980
|
-
mask=[[0, 0], [0, 0], [0, 1]])
|
|
981
|
-
assert_equal(test, control)
|
|
982
|
-
assert_equal(test.data, control.data)
|
|
983
|
-
assert_equal(test.mask, control.mask)
|
|
984
|
-
|
|
985
|
-
def test_domained_binops_d2D(self):
|
|
986
|
-
# Test domained binary operations on 2D data
|
|
987
|
-
a = array([[1.], [2.], [3.]], mask=[[False], [True], [True]])
|
|
988
|
-
b = array([[2., 3.], [4., 5.], [6., 7.]])
|
|
989
|
-
#
|
|
990
|
-
test = a / b
|
|
991
|
-
control = array([[1. / 2., 1. / 3.], [2., 2.], [3., 3.]],
|
|
992
|
-
mask=[[0, 0], [1, 1], [1, 1]])
|
|
993
|
-
assert_equal(test, control)
|
|
994
|
-
assert_equal(test.data, control.data)
|
|
995
|
-
assert_equal(test.mask, control.mask)
|
|
996
|
-
#
|
|
997
|
-
test = b / a
|
|
998
|
-
control = array([[2. / 1., 3. / 1.], [4., 5.], [6., 7.]],
|
|
999
|
-
mask=[[0, 0], [1, 1], [1, 1]])
|
|
1000
|
-
assert_equal(test, control)
|
|
1001
|
-
assert_equal(test.data, control.data)
|
|
1002
|
-
assert_equal(test.mask, control.mask)
|
|
1003
|
-
#
|
|
1004
|
-
a = array([[1.], [2.], [3.]])
|
|
1005
|
-
b = array([[2., 3.], [4., 5.], [6., 7.]],
|
|
1006
|
-
mask=[[0, 0], [0, 0], [0, 1]])
|
|
1007
|
-
test = a / b
|
|
1008
|
-
control = array([[1. / 2, 1. / 3], [2. / 4, 2. / 5], [3. / 6, 3]],
|
|
1009
|
-
mask=[[0, 0], [0, 0], [0, 1]])
|
|
1010
|
-
assert_equal(test, control)
|
|
1011
|
-
assert_equal(test.data, control.data)
|
|
1012
|
-
assert_equal(test.mask, control.mask)
|
|
1013
|
-
#
|
|
1014
|
-
test = b / a
|
|
1015
|
-
control = array([[2 / 1., 3 / 1.], [4 / 2., 5 / 2.], [6 / 3., 7]],
|
|
1016
|
-
mask=[[0, 0], [0, 0], [0, 1]])
|
|
1017
|
-
assert_equal(test, control)
|
|
1018
|
-
assert_equal(test.data, control.data)
|
|
1019
|
-
assert_equal(test.mask, control.mask)
|
|
1020
|
-
|
|
1021
|
-
def test_noshrinking(self):
|
|
1022
|
-
# Check that we don't shrink a mask when not wanted
|
|
1023
|
-
# Binary operations
|
|
1024
|
-
a = masked_array([1., 2., 3.], mask=[False, False, False],
|
|
1025
|
-
shrink=False)
|
|
1026
|
-
b = a + 1
|
|
1027
|
-
assert_equal(b.mask, [0, 0, 0])
|
|
1028
|
-
# In place binary operation
|
|
1029
|
-
a += 1
|
|
1030
|
-
assert_equal(a.mask, [0, 0, 0])
|
|
1031
|
-
# Domained binary operation
|
|
1032
|
-
b = a / 1.
|
|
1033
|
-
assert_equal(b.mask, [0, 0, 0])
|
|
1034
|
-
# In place binary operation
|
|
1035
|
-
a /= 1.
|
|
1036
|
-
assert_equal(a.mask, [0, 0, 0])
|
|
1037
|
-
|
|
1038
|
-
def test_mod(self):
|
|
1039
|
-
# Tests mod
|
|
1040
|
-
(x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d
|
|
1041
|
-
assert_equal(mod(x, y), mod(xm, ym))
|
|
1042
|
-
test = mod(ym, xm)
|
|
1043
|
-
assert_equal(test, np.mod(ym, xm))
|
|
1044
|
-
assert_equal(test.mask, mask_or(xm.mask, ym.mask))
|
|
1045
|
-
test = mod(xm, ym)
|
|
1046
|
-
assert_equal(test, np.mod(xm, ym))
|
|
1047
|
-
assert_equal(test.mask, mask_or(mask_or(xm.mask, ym.mask), (ym == 0)))
|
|
1048
|
-
|
|
1049
|
-
def test_TakeTransposeInnerOuter(self):
|
|
1050
|
-
# Test of take, transpose, inner, outer products
|
|
1051
|
-
x = arange(24)
|
|
1052
|
-
y = np.arange(24)
|
|
1053
|
-
x[5:6] = masked
|
|
1054
|
-
x = x.reshape(2, 3, 4)
|
|
1055
|
-
y = y.reshape(2, 3, 4)
|
|
1056
|
-
assert_equal(np.transpose(y, (2, 0, 1)), transpose(x, (2, 0, 1)))
|
|
1057
|
-
assert_equal(np.take(y, (2, 0, 1), 1), take(x, (2, 0, 1), 1))
|
|
1058
|
-
assert_equal(np.inner(filled(x, 0), filled(y, 0)),
|
|
1059
|
-
inner(x, y))
|
|
1060
|
-
assert_equal(np.outer(filled(x, 0), filled(y, 0)),
|
|
1061
|
-
outer(x, y))
|
|
1062
|
-
y = array(['abc', 1, 'def', 2, 3], object)
|
|
1063
|
-
y[2] = masked
|
|
1064
|
-
t = take(y, [0, 3, 4])
|
|
1065
|
-
assert_(t[0] == 'abc')
|
|
1066
|
-
assert_(t[1] == 2)
|
|
1067
|
-
assert_(t[2] == 3)
|
|
1068
|
-
|
|
1069
|
-
def test_imag_real(self):
|
|
1070
|
-
# Check complex
|
|
1071
|
-
xx = array([1 + 10j, 20 + 2j], mask=[1, 0])
|
|
1072
|
-
assert_equal(xx.imag, [10, 2])
|
|
1073
|
-
assert_equal(xx.imag.filled(), [1e+20, 2])
|
|
1074
|
-
assert_equal(xx.imag.dtype, xx._data.imag.dtype)
|
|
1075
|
-
assert_equal(xx.real, [1, 20])
|
|
1076
|
-
assert_equal(xx.real.filled(), [1e+20, 20])
|
|
1077
|
-
assert_equal(xx.real.dtype, xx._data.real.dtype)
|
|
1078
|
-
|
|
1079
|
-
def test_methods_with_output(self):
|
|
1080
|
-
xm = array(np.random.uniform(0, 10, 12)).reshape(3, 4)
|
|
1081
|
-
xm[:, 0] = xm[0] = xm[-1, -1] = masked
|
|
1082
|
-
#
|
|
1083
|
-
funclist = ('sum', 'prod', 'var', 'std', 'max', 'min', 'ptp', 'mean',)
|
|
1084
|
-
#
|
|
1085
|
-
for funcname in funclist:
|
|
1086
|
-
npfunc = getattr(np, funcname)
|
|
1087
|
-
xmmeth = getattr(xm, funcname)
|
|
1088
|
-
# A ndarray as explicit input
|
|
1089
|
-
output = np.empty(4, dtype=float)
|
|
1090
|
-
output.fill(-9999)
|
|
1091
|
-
result = npfunc(xm, axis=0, out=output)
|
|
1092
|
-
# ... the result should be the given output
|
|
1093
|
-
assert_(result is output)
|
|
1094
|
-
assert_equal(result, xmmeth(axis=0, out=output))
|
|
1095
|
-
#
|
|
1096
|
-
output = empty(4, dtype=int)
|
|
1097
|
-
result = xmmeth(axis=0, out=output)
|
|
1098
|
-
assert_(result is output)
|
|
1099
|
-
assert_(output[0] is masked)
|
|
1100
|
-
|
|
1101
|
-
def test_eq_on_structured(self):
|
|
1102
|
-
# Test the equality of structured arrays
|
|
1103
|
-
ndtype = [('A', int), ('B', int)]
|
|
1104
|
-
a = array([(1, 1), (2, 2)], mask=[(0, 1), (0, 0)], dtype=ndtype)
|
|
1105
|
-
test = (a == a)
|
|
1106
|
-
assert_equal(test, [True, True])
|
|
1107
|
-
assert_equal(test.mask, [False, False])
|
|
1108
|
-
b = array([(1, 1), (2, 2)], mask=[(1, 0), (0, 0)], dtype=ndtype)
|
|
1109
|
-
test = (a == b)
|
|
1110
|
-
assert_equal(test, [False, True])
|
|
1111
|
-
assert_equal(test.mask, [True, False])
|
|
1112
|
-
b = array([(1, 1), (2, 2)], mask=[(0, 1), (1, 0)], dtype=ndtype)
|
|
1113
|
-
test = (a == b)
|
|
1114
|
-
assert_equal(test, [True, False])
|
|
1115
|
-
assert_equal(test.mask, [False, False])
|
|
1116
|
-
|
|
1117
|
-
def test_ne_on_structured(self):
|
|
1118
|
-
# Test the equality of structured arrays
|
|
1119
|
-
ndtype = [('A', int), ('B', int)]
|
|
1120
|
-
a = array([(1, 1), (2, 2)], mask=[(0, 1), (0, 0)], dtype=ndtype)
|
|
1121
|
-
test = (a != a)
|
|
1122
|
-
assert_equal(test, [False, False])
|
|
1123
|
-
assert_equal(test.mask, [False, False])
|
|
1124
|
-
b = array([(1, 1), (2, 2)], mask=[(1, 0), (0, 0)], dtype=ndtype)
|
|
1125
|
-
test = (a != b)
|
|
1126
|
-
assert_equal(test, [True, False])
|
|
1127
|
-
assert_equal(test.mask, [True, False])
|
|
1128
|
-
b = array([(1, 1), (2, 2)], mask=[(0, 1), (1, 0)], dtype=ndtype)
|
|
1129
|
-
test = (a != b)
|
|
1130
|
-
assert_equal(test, [False, True])
|
|
1131
|
-
assert_equal(test.mask, [False, False])
|
|
1132
|
-
|
|
1133
|
-
def test_eq_w_None(self):
|
|
1134
|
-
# Really, comparisons with None should not be done, but
|
|
1135
|
-
# check them anyway
|
|
1136
|
-
# With partial mask
|
|
1137
|
-
a = array([1, 2], mask=[0, 1])
|
|
1138
|
-
assert_equal(a == None, False)
|
|
1139
|
-
assert_equal(a.data == None, False)
|
|
1140
|
-
assert_equal(a.mask == None, False)
|
|
1141
|
-
assert_equal(a != None, True)
|
|
1142
|
-
# With nomask
|
|
1143
|
-
a = array([1, 2], mask=False)
|
|
1144
|
-
assert_equal(a == None, False)
|
|
1145
|
-
assert_equal(a != None, True)
|
|
1146
|
-
# With complete mask
|
|
1147
|
-
a = array([1, 2], mask=True)
|
|
1148
|
-
assert_equal(a == None, False)
|
|
1149
|
-
assert_equal(a != None, True)
|
|
1150
|
-
# Fully masked, even comparison to None should return "masked"
|
|
1151
|
-
a = masked
|
|
1152
|
-
assert_equal(a == None, masked)
|
|
1153
|
-
|
|
1154
|
-
def test_eq_w_scalar(self):
|
|
1155
|
-
a = array(1)
|
|
1156
|
-
assert_equal(a == 1, True)
|
|
1157
|
-
assert_equal(a == 0, False)
|
|
1158
|
-
assert_equal(a != 1, False)
|
|
1159
|
-
assert_equal(a != 0, True)
|
|
1160
|
-
|
|
1161
|
-
def test_numpyarithmetics(self):
|
|
1162
|
-
# Check that the mask is not back-propagated when using numpy functions
|
|
1163
|
-
a = masked_array([-1, 0, 1, 2, 3], mask=[0, 0, 0, 0, 1])
|
|
1164
|
-
control = masked_array([np.nan, np.nan, 0, np.log(2), -1],
|
|
1165
|
-
mask=[1, 1, 0, 0, 1])
|
|
1166
|
-
#
|
|
1167
|
-
test = log(a)
|
|
1168
|
-
assert_equal(test, control)
|
|
1169
|
-
assert_equal(test.mask, control.mask)
|
|
1170
|
-
assert_equal(a.mask, [0, 0, 0, 0, 1])
|
|
1171
|
-
#
|
|
1172
|
-
test = np.log(a)
|
|
1173
|
-
assert_equal(test, control)
|
|
1174
|
-
assert_equal(test.mask, control.mask)
|
|
1175
|
-
assert_equal(a.mask, [0, 0, 0, 0, 1])
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
#------------------------------------------------------------------------------
|
|
1179
|
-
class TestMaskedArrayAttributes(TestCase):
|
|
1180
|
-
|
|
1181
|
-
def test_keepmask(self):
|
|
1182
|
-
# Tests the keep mask flag
|
|
1183
|
-
x = masked_array([1, 2, 3], mask=[1, 0, 0])
|
|
1184
|
-
mx = masked_array(x)
|
|
1185
|
-
assert_equal(mx.mask, x.mask)
|
|
1186
|
-
mx = masked_array(x, mask=[0, 1, 0], keep_mask=False)
|
|
1187
|
-
assert_equal(mx.mask, [0, 1, 0])
|
|
1188
|
-
mx = masked_array(x, mask=[0, 1, 0], keep_mask=True)
|
|
1189
|
-
assert_equal(mx.mask, [1, 1, 0])
|
|
1190
|
-
# We default to true
|
|
1191
|
-
mx = masked_array(x, mask=[0, 1, 0])
|
|
1192
|
-
assert_equal(mx.mask, [1, 1, 0])
|
|
1193
|
-
|
|
1194
|
-
def test_hardmask(self):
|
|
1195
|
-
# Test hard_mask
|
|
1196
|
-
d = arange(5)
|
|
1197
|
-
n = [0, 0, 0, 1, 1]
|
|
1198
|
-
m = make_mask(n)
|
|
1199
|
-
xh = array(d, mask=m, hard_mask=True)
|
|
1200
|
-
# We need to copy, to avoid updating d in xh !
|
|
1201
|
-
xs = array(d, mask=m, hard_mask=False, copy=True)
|
|
1202
|
-
xh[[1, 4]] = [10, 40]
|
|
1203
|
-
xs[[1, 4]] = [10, 40]
|
|
1204
|
-
assert_equal(xh._data, [0, 10, 2, 3, 4])
|
|
1205
|
-
assert_equal(xs._data, [0, 10, 2, 3, 40])
|
|
1206
|
-
#assert_equal(xh.mask.ctypes._data, m.ctypes._data)
|
|
1207
|
-
assert_equal(xs.mask, [0, 0, 0, 1, 0])
|
|
1208
|
-
self.assertTrue(xh._hardmask)
|
|
1209
|
-
self.assertTrue(not xs._hardmask)
|
|
1210
|
-
xh[1:4] = [10, 20, 30]
|
|
1211
|
-
xs[1:4] = [10, 20, 30]
|
|
1212
|
-
assert_equal(xh._data, [0, 10, 20, 3, 4])
|
|
1213
|
-
assert_equal(xs._data, [0, 10, 20, 30, 40])
|
|
1214
|
-
#assert_equal(xh.mask.ctypes._data, m.ctypes._data)
|
|
1215
|
-
assert_equal(xs.mask, nomask)
|
|
1216
|
-
xh[0] = masked
|
|
1217
|
-
xs[0] = masked
|
|
1218
|
-
assert_equal(xh.mask, [1, 0, 0, 1, 1])
|
|
1219
|
-
assert_equal(xs.mask, [1, 0, 0, 0, 0])
|
|
1220
|
-
xh[:] = 1
|
|
1221
|
-
xs[:] = 1
|
|
1222
|
-
assert_equal(xh._data, [0, 1, 1, 3, 4])
|
|
1223
|
-
assert_equal(xs._data, [1, 1, 1, 1, 1])
|
|
1224
|
-
assert_equal(xh.mask, [1, 0, 0, 1, 1])
|
|
1225
|
-
assert_equal(xs.mask, nomask)
|
|
1226
|
-
# Switch to soft mask
|
|
1227
|
-
xh.soften_mask()
|
|
1228
|
-
xh[:] = arange(5)
|
|
1229
|
-
assert_equal(xh._data, [0, 1, 2, 3, 4])
|
|
1230
|
-
assert_equal(xh.mask, nomask)
|
|
1231
|
-
# Switch back to hard mask
|
|
1232
|
-
xh.harden_mask()
|
|
1233
|
-
xh[xh < 3] = masked
|
|
1234
|
-
assert_equal(xh._data, [0, 1, 2, 3, 4])
|
|
1235
|
-
assert_equal(xh._mask, [1, 1, 1, 0, 0])
|
|
1236
|
-
xh[filled(xh > 1, False)] = 5
|
|
1237
|
-
assert_equal(xh._data, [0, 1, 2, 5, 5])
|
|
1238
|
-
assert_equal(xh._mask, [1, 1, 1, 0, 0])
|
|
1239
|
-
#
|
|
1240
|
-
xh = array([[1, 2], [3, 4]], mask=[[1, 0], [0, 0]], hard_mask=True)
|
|
1241
|
-
xh[0] = 0
|
|
1242
|
-
assert_equal(xh._data, [[1, 0], [3, 4]])
|
|
1243
|
-
assert_equal(xh._mask, [[1, 0], [0, 0]])
|
|
1244
|
-
xh[-1, -1] = 5
|
|
1245
|
-
assert_equal(xh._data, [[1, 0], [3, 5]])
|
|
1246
|
-
assert_equal(xh._mask, [[1, 0], [0, 0]])
|
|
1247
|
-
xh[filled(xh < 5, False)] = 2
|
|
1248
|
-
assert_equal(xh._data, [[1, 2], [2, 5]])
|
|
1249
|
-
assert_equal(xh._mask, [[1, 0], [0, 0]])
|
|
1250
|
-
|
|
1251
|
-
def test_hardmask_again(self):
|
|
1252
|
-
# Another test of hardmask
|
|
1253
|
-
d = arange(5)
|
|
1254
|
-
n = [0, 0, 0, 1, 1]
|
|
1255
|
-
m = make_mask(n)
|
|
1256
|
-
xh = array(d, mask=m, hard_mask=True)
|
|
1257
|
-
xh[4:5] = 999
|
|
1258
|
-
#assert_equal(xh.mask.ctypes._data, m.ctypes._data)
|
|
1259
|
-
xh[0:1] = 999
|
|
1260
|
-
assert_equal(xh._data, [999, 1, 2, 3, 4])
|
|
1261
|
-
|
|
1262
|
-
def test_hardmask_oncemore_yay(self):
|
|
1263
|
-
# OK, yet another test of hardmask
|
|
1264
|
-
# Make sure that harden_mask/soften_mask//unshare_mask returns self
|
|
1265
|
-
a = array([1, 2, 3], mask=[1, 0, 0])
|
|
1266
|
-
b = a.harden_mask()
|
|
1267
|
-
assert_equal(a, b)
|
|
1268
|
-
b[0] = 0
|
|
1269
|
-
assert_equal(a, b)
|
|
1270
|
-
assert_equal(b, array([1, 2, 3], mask=[1, 0, 0]))
|
|
1271
|
-
a = b.soften_mask()
|
|
1272
|
-
a[0] = 0
|
|
1273
|
-
assert_equal(a, b)
|
|
1274
|
-
assert_equal(b, array([0, 2, 3], mask=[0, 0, 0]))
|
|
1275
|
-
|
|
1276
|
-
def test_smallmask(self):
|
|
1277
|
-
# Checks the behaviour of _smallmask
|
|
1278
|
-
a = arange(10)
|
|
1279
|
-
a[1] = masked
|
|
1280
|
-
a[1] = 1
|
|
1281
|
-
assert_equal(a._mask, nomask)
|
|
1282
|
-
a = arange(10)
|
|
1283
|
-
a._smallmask = False
|
|
1284
|
-
a[1] = masked
|
|
1285
|
-
a[1] = 1
|
|
1286
|
-
assert_equal(a._mask, zeros(10))
|
|
1287
|
-
|
|
1288
|
-
def test_shrink_mask(self):
|
|
1289
|
-
# Tests .shrink_mask()
|
|
1290
|
-
a = array([1, 2, 3], mask=[0, 0, 0])
|
|
1291
|
-
b = a.shrink_mask()
|
|
1292
|
-
assert_equal(a, b)
|
|
1293
|
-
assert_equal(a.mask, nomask)
|
|
1294
|
-
|
|
1295
|
-
def test_flat(self):
|
|
1296
|
-
# Test that flat can return all types of items [#4585, #4615]
|
|
1297
|
-
# test simple access
|
|
1298
|
-
test = masked_array(np.matrix([[1, 2, 3]]), mask=[0, 0, 1])
|
|
1299
|
-
assert_equal(test.flat[1], 2)
|
|
1300
|
-
assert_equal(test.flat[2], masked)
|
|
1301
|
-
self.assertTrue(np.all(test.flat[0:2] == test[0, 0:2]))
|
|
1302
|
-
# Test flat on masked_matrices
|
|
1303
|
-
test = masked_array(np.matrix([[1, 2, 3]]), mask=[0, 0, 1])
|
|
1304
|
-
test.flat = masked_array([3, 2, 1], mask=[1, 0, 0])
|
|
1305
|
-
control = masked_array(np.matrix([[3, 2, 1]]), mask=[1, 0, 0])
|
|
1306
|
-
assert_equal(test, control)
|
|
1307
|
-
# Test setting
|
|
1308
|
-
test = masked_array(np.matrix([[1, 2, 3]]), mask=[0, 0, 1])
|
|
1309
|
-
testflat = test.flat
|
|
1310
|
-
testflat[:] = testflat[[2, 1, 0]]
|
|
1311
|
-
assert_equal(test, control)
|
|
1312
|
-
testflat[0] = 9
|
|
1313
|
-
assert_equal(test[0, 0], 9)
|
|
1314
|
-
# test 2-D record array
|
|
1315
|
-
# ... on structured array w/ masked records
|
|
1316
|
-
x = array([[(1, 1.1, 'one'), (2, 2.2, 'two'), (3, 3.3, 'thr')],
|
|
1317
|
-
[(4, 4.4, 'fou'), (5, 5.5, 'fiv'), (6, 6.6, 'six')]],
|
|
1318
|
-
dtype=[('a', int), ('b', float), ('c', '|S8')])
|
|
1319
|
-
x['a'][0, 1] = masked
|
|
1320
|
-
x['b'][1, 0] = masked
|
|
1321
|
-
x['c'][0, 2] = masked
|
|
1322
|
-
x[-1, -1] = masked
|
|
1323
|
-
xflat = x.flat
|
|
1324
|
-
assert_equal(xflat[0], x[0, 0])
|
|
1325
|
-
assert_equal(xflat[1], x[0, 1])
|
|
1326
|
-
assert_equal(xflat[2], x[0, 2])
|
|
1327
|
-
assert_equal(xflat[:3], x[0])
|
|
1328
|
-
assert_equal(xflat[3], x[1, 0])
|
|
1329
|
-
assert_equal(xflat[4], x[1, 1])
|
|
1330
|
-
assert_equal(xflat[5], x[1, 2])
|
|
1331
|
-
assert_equal(xflat[3:], x[1])
|
|
1332
|
-
assert_equal(xflat[-1], x[-1, -1])
|
|
1333
|
-
i = 0
|
|
1334
|
-
j = 0
|
|
1335
|
-
for xf in xflat:
|
|
1336
|
-
assert_equal(xf, x[j, i])
|
|
1337
|
-
i += 1
|
|
1338
|
-
if i >= x.shape[-1]:
|
|
1339
|
-
i = 0
|
|
1340
|
-
j += 1
|
|
1341
|
-
# test that matrices keep the correct shape (#4615)
|
|
1342
|
-
a = masked_array(np.matrix(np.eye(2)), mask=0)
|
|
1343
|
-
b = a.flat
|
|
1344
|
-
b01 = b[:2]
|
|
1345
|
-
assert_equal(b01.data, array([[1., 0.]]))
|
|
1346
|
-
assert_equal(b01.mask, array([[False, False]]))
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
#------------------------------------------------------------------------------
|
|
1350
|
-
class TestFillingValues(TestCase):
|
|
1351
|
-
|
|
1352
|
-
def test_check_on_scalar(self):
|
|
1353
|
-
# Test _check_fill_value set to valid and invalid values
|
|
1354
|
-
_check_fill_value = np.ma.core._check_fill_value
|
|
1355
|
-
#
|
|
1356
|
-
fval = _check_fill_value(0, int)
|
|
1357
|
-
assert_equal(fval, 0)
|
|
1358
|
-
fval = _check_fill_value(None, int)
|
|
1359
|
-
assert_equal(fval, default_fill_value(0))
|
|
1360
|
-
#
|
|
1361
|
-
fval = _check_fill_value(0, "|S3")
|
|
1362
|
-
assert_equal(fval, asbytes("0"))
|
|
1363
|
-
fval = _check_fill_value(None, "|S3")
|
|
1364
|
-
assert_equal(fval, default_fill_value("|S3"))
|
|
1365
|
-
self.assertRaises(TypeError, _check_fill_value, 1e+20, int)
|
|
1366
|
-
self.assertRaises(TypeError, _check_fill_value, 'stuff', int)
|
|
1367
|
-
|
|
1368
|
-
def test_check_on_fields(self):
|
|
1369
|
-
# Tests _check_fill_value with records
|
|
1370
|
-
_check_fill_value = np.ma.core._check_fill_value
|
|
1371
|
-
ndtype = [('a', int), ('b', float), ('c', "|S3")]
|
|
1372
|
-
# A check on a list should return a single record
|
|
1373
|
-
fval = _check_fill_value([-999, -12345678.9, "???"], ndtype)
|
|
1374
|
-
self.assertTrue(isinstance(fval, ndarray))
|
|
1375
|
-
assert_equal(fval.item(), [-999, -12345678.9, asbytes("???")])
|
|
1376
|
-
# A check on None should output the defaults
|
|
1377
|
-
fval = _check_fill_value(None, ndtype)
|
|
1378
|
-
self.assertTrue(isinstance(fval, ndarray))
|
|
1379
|
-
assert_equal(fval.item(), [default_fill_value(0),
|
|
1380
|
-
default_fill_value(0.),
|
|
1381
|
-
asbytes(default_fill_value("0"))])
|
|
1382
|
-
#.....Using a structured type as fill_value should work
|
|
1383
|
-
fill_val = np.array((-999, -12345678.9, "???"), dtype=ndtype)
|
|
1384
|
-
fval = _check_fill_value(fill_val, ndtype)
|
|
1385
|
-
self.assertTrue(isinstance(fval, ndarray))
|
|
1386
|
-
assert_equal(fval.item(), [-999, -12345678.9, asbytes("???")])
|
|
1387
|
-
|
|
1388
|
-
#.....Using a flexible type w/ a different type shouldn't matter
|
|
1389
|
-
# BEHAVIOR in 1.5 and earlier: match structured types by position
|
|
1390
|
-
#fill_val = np.array((-999, -12345678.9, "???"),
|
|
1391
|
-
# dtype=[("A", int), ("B", float), ("C", "|S3")])
|
|
1392
|
-
# BEHAVIOR in 1.6 and later: match structured types by name
|
|
1393
|
-
fill_val = np.array(("???", -999, -12345678.9),
|
|
1394
|
-
dtype=[("c", "|S3"), ("a", int), ("b", float), ])
|
|
1395
|
-
fval = _check_fill_value(fill_val, ndtype)
|
|
1396
|
-
self.assertTrue(isinstance(fval, ndarray))
|
|
1397
|
-
assert_equal(fval.item(), [-999, -12345678.9, asbytes("???")])
|
|
1398
|
-
|
|
1399
|
-
#.....Using an object-array shouldn't matter either
|
|
1400
|
-
fill_val = np.ndarray(shape=(1,), dtype=object)
|
|
1401
|
-
fill_val[0] = (-999, -12345678.9, asbytes("???"))
|
|
1402
|
-
fval = _check_fill_value(fill_val, object)
|
|
1403
|
-
self.assertTrue(isinstance(fval, ndarray))
|
|
1404
|
-
assert_equal(fval.item(), [-999, -12345678.9, asbytes("???")])
|
|
1405
|
-
# NOTE: This test was never run properly as "fill_value" rather than
|
|
1406
|
-
# "fill_val" was assigned. Written properly, it fails.
|
|
1407
|
-
#fill_val = np.array((-999, -12345678.9, "???"))
|
|
1408
|
-
#fval = _check_fill_value(fill_val, ndtype)
|
|
1409
|
-
#self.assertTrue(isinstance(fval, ndarray))
|
|
1410
|
-
#assert_equal(fval.item(), [-999, -12345678.9, asbytes("???")])
|
|
1411
|
-
#.....One-field-only flexible type should work as well
|
|
1412
|
-
ndtype = [("a", int)]
|
|
1413
|
-
fval = _check_fill_value(-999999999, ndtype)
|
|
1414
|
-
self.assertTrue(isinstance(fval, ndarray))
|
|
1415
|
-
assert_equal(fval.item(), (-999999999,))
|
|
1416
|
-
|
|
1417
|
-
def test_fillvalue_conversion(self):
|
|
1418
|
-
# Tests the behavior of fill_value during conversion
|
|
1419
|
-
# We had a tailored comment to make sure special attributes are
|
|
1420
|
-
# properly dealt with
|
|
1421
|
-
a = array(asbytes_nested(['3', '4', '5']))
|
|
1422
|
-
a._optinfo.update({'comment':"updated!"})
|
|
1423
|
-
#
|
|
1424
|
-
b = array(a, dtype=int)
|
|
1425
|
-
assert_equal(b._data, [3, 4, 5])
|
|
1426
|
-
assert_equal(b.fill_value, default_fill_value(0))
|
|
1427
|
-
#
|
|
1428
|
-
b = array(a, dtype=float)
|
|
1429
|
-
assert_equal(b._data, [3, 4, 5])
|
|
1430
|
-
assert_equal(b.fill_value, default_fill_value(0.))
|
|
1431
|
-
#
|
|
1432
|
-
b = a.astype(int)
|
|
1433
|
-
assert_equal(b._data, [3, 4, 5])
|
|
1434
|
-
assert_equal(b.fill_value, default_fill_value(0))
|
|
1435
|
-
assert_equal(b._optinfo['comment'], "updated!")
|
|
1436
|
-
#
|
|
1437
|
-
b = a.astype([('a', '|S3')])
|
|
1438
|
-
assert_equal(b['a']._data, a._data)
|
|
1439
|
-
assert_equal(b['a'].fill_value, a.fill_value)
|
|
1440
|
-
|
|
1441
|
-
def test_fillvalue(self):
|
|
1442
|
-
# Yet more fun with the fill_value
|
|
1443
|
-
data = masked_array([1, 2, 3], fill_value=-999)
|
|
1444
|
-
series = data[[0, 2, 1]]
|
|
1445
|
-
assert_equal(series._fill_value, data._fill_value)
|
|
1446
|
-
#
|
|
1447
|
-
mtype = [('f', float), ('s', '|S3')]
|
|
1448
|
-
x = array([(1, 'a'), (2, 'b'), (pi, 'pi')], dtype=mtype)
|
|
1449
|
-
x.fill_value = 999
|
|
1450
|
-
assert_equal(x.fill_value.item(), [999., asbytes('999')])
|
|
1451
|
-
assert_equal(x['f'].fill_value, 999)
|
|
1452
|
-
assert_equal(x['s'].fill_value, asbytes('999'))
|
|
1453
|
-
#
|
|
1454
|
-
x.fill_value = (9, '???')
|
|
1455
|
-
assert_equal(x.fill_value.item(), (9, asbytes('???')))
|
|
1456
|
-
assert_equal(x['f'].fill_value, 9)
|
|
1457
|
-
assert_equal(x['s'].fill_value, asbytes('???'))
|
|
1458
|
-
#
|
|
1459
|
-
x = array([1, 2, 3.1])
|
|
1460
|
-
x.fill_value = 999
|
|
1461
|
-
assert_equal(np.asarray(x.fill_value).dtype, float)
|
|
1462
|
-
assert_equal(x.fill_value, 999.)
|
|
1463
|
-
assert_equal(x._fill_value, np.array(999.))
|
|
1464
|
-
|
|
1465
|
-
def test_fillvalue_exotic_dtype(self):
|
|
1466
|
-
# Tests yet more exotic flexible dtypes
|
|
1467
|
-
_check_fill_value = np.ma.core._check_fill_value
|
|
1468
|
-
ndtype = [('i', int), ('s', '|S8'), ('f', float)]
|
|
1469
|
-
control = np.array((default_fill_value(0),
|
|
1470
|
-
default_fill_value('0'),
|
|
1471
|
-
default_fill_value(0.),),
|
|
1472
|
-
dtype=ndtype)
|
|
1473
|
-
assert_equal(_check_fill_value(None, ndtype), control)
|
|
1474
|
-
# The shape shouldn't matter
|
|
1475
|
-
ndtype = [('f0', float, (2, 2))]
|
|
1476
|
-
control = np.array((default_fill_value(0.),),
|
|
1477
|
-
dtype=[('f0', float)]).astype(ndtype)
|
|
1478
|
-
assert_equal(_check_fill_value(None, ndtype), control)
|
|
1479
|
-
control = np.array((0,), dtype=[('f0', float)]).astype(ndtype)
|
|
1480
|
-
assert_equal(_check_fill_value(0, ndtype), control)
|
|
1481
|
-
#
|
|
1482
|
-
ndtype = np.dtype("int, (2,3)float, float")
|
|
1483
|
-
control = np.array((default_fill_value(0),
|
|
1484
|
-
default_fill_value(0.),
|
|
1485
|
-
default_fill_value(0.),),
|
|
1486
|
-
dtype="int, float, float").astype(ndtype)
|
|
1487
|
-
test = _check_fill_value(None, ndtype)
|
|
1488
|
-
assert_equal(test, control)
|
|
1489
|
-
control = np.array((0, 0, 0), dtype="int, float, float").astype(ndtype)
|
|
1490
|
-
assert_equal(_check_fill_value(0, ndtype), control)
|
|
1491
|
-
|
|
1492
|
-
def test_fillvalue_datetime_timedelta(self):
|
|
1493
|
-
# Test default fillvalue for datetime64 and timedelta64 types.
|
|
1494
|
-
# See issue #4476, this would return '?' which would cause errors
|
|
1495
|
-
# elsewhere
|
|
1496
|
-
|
|
1497
|
-
for timecode in ("as", "fs", "ps", "ns", "us", "ms", "s", "m",
|
|
1498
|
-
"h", "D", "W", "M", "Y"):
|
|
1499
|
-
control = numpy.datetime64("NaT", timecode)
|
|
1500
|
-
test = default_fill_value(numpy.dtype("<M8[" + timecode + "]"))
|
|
1501
|
-
assert_equal(test, control)
|
|
1502
|
-
|
|
1503
|
-
control = numpy.timedelta64("NaT", timecode)
|
|
1504
|
-
test = default_fill_value(numpy.dtype("<m8[" + timecode + "]"))
|
|
1505
|
-
assert_equal(test, control)
|
|
1506
|
-
|
|
1507
|
-
def test_extremum_fill_value(self):
|
|
1508
|
-
# Tests extremum fill values for flexible type.
|
|
1509
|
-
a = array([(1, (2, 3)), (4, (5, 6))],
|
|
1510
|
-
dtype=[('A', int), ('B', [('BA', int), ('BB', int)])])
|
|
1511
|
-
test = a.fill_value
|
|
1512
|
-
assert_equal(test['A'], default_fill_value(a['A']))
|
|
1513
|
-
assert_equal(test['B']['BA'], default_fill_value(a['B']['BA']))
|
|
1514
|
-
assert_equal(test['B']['BB'], default_fill_value(a['B']['BB']))
|
|
1515
|
-
#
|
|
1516
|
-
test = minimum_fill_value(a)
|
|
1517
|
-
assert_equal(test[0], minimum_fill_value(a['A']))
|
|
1518
|
-
assert_equal(test[1][0], minimum_fill_value(a['B']['BA']))
|
|
1519
|
-
assert_equal(test[1][1], minimum_fill_value(a['B']['BB']))
|
|
1520
|
-
assert_equal(test[1], minimum_fill_value(a['B']))
|
|
1521
|
-
#
|
|
1522
|
-
test = maximum_fill_value(a)
|
|
1523
|
-
assert_equal(test[0], maximum_fill_value(a['A']))
|
|
1524
|
-
assert_equal(test[1][0], maximum_fill_value(a['B']['BA']))
|
|
1525
|
-
assert_equal(test[1][1], maximum_fill_value(a['B']['BB']))
|
|
1526
|
-
assert_equal(test[1], maximum_fill_value(a['B']))
|
|
1527
|
-
|
|
1528
|
-
def test_fillvalue_individual_fields(self):
|
|
1529
|
-
# Test setting fill_value on individual fields
|
|
1530
|
-
ndtype = [('a', int), ('b', int)]
|
|
1531
|
-
# Explicit fill_value
|
|
1532
|
-
a = array(list(zip([1, 2, 3], [4, 5, 6])),
|
|
1533
|
-
fill_value=(-999, -999), dtype=ndtype)
|
|
1534
|
-
aa = a['a']
|
|
1535
|
-
aa.set_fill_value(10)
|
|
1536
|
-
assert_equal(aa._fill_value, np.array(10))
|
|
1537
|
-
assert_equal(tuple(a.fill_value), (10, -999))
|
|
1538
|
-
a.fill_value['b'] = -10
|
|
1539
|
-
assert_equal(tuple(a.fill_value), (10, -10))
|
|
1540
|
-
# Implicit fill_value
|
|
1541
|
-
t = array(list(zip([1, 2, 3], [4, 5, 6])), dtype=ndtype)
|
|
1542
|
-
tt = t['a']
|
|
1543
|
-
tt.set_fill_value(10)
|
|
1544
|
-
assert_equal(tt._fill_value, np.array(10))
|
|
1545
|
-
assert_equal(tuple(t.fill_value), (10, default_fill_value(0)))
|
|
1546
|
-
|
|
1547
|
-
def test_fillvalue_implicit_structured_array(self):
|
|
1548
|
-
# Check that fill_value is always defined for structured arrays
|
|
1549
|
-
ndtype = ('b', float)
|
|
1550
|
-
adtype = ('a', float)
|
|
1551
|
-
a = array([(1.,), (2.,)], mask=[(False,), (False,)],
|
|
1552
|
-
fill_value=(np.nan,), dtype=np.dtype([adtype]))
|
|
1553
|
-
b = empty(a.shape, dtype=[adtype, ndtype])
|
|
1554
|
-
b['a'] = a['a']
|
|
1555
|
-
b['a'].set_fill_value(a['a'].fill_value)
|
|
1556
|
-
f = b._fill_value[()]
|
|
1557
|
-
assert_(np.isnan(f[0]))
|
|
1558
|
-
assert_equal(f[-1], default_fill_value(1.))
|
|
1559
|
-
|
|
1560
|
-
def test_fillvalue_as_arguments(self):
|
|
1561
|
-
# Test adding a fill_value parameter to empty/ones/zeros
|
|
1562
|
-
a = empty(3, fill_value=999.)
|
|
1563
|
-
assert_equal(a.fill_value, 999.)
|
|
1564
|
-
#
|
|
1565
|
-
a = ones(3, fill_value=999., dtype=float)
|
|
1566
|
-
assert_equal(a.fill_value, 999.)
|
|
1567
|
-
#
|
|
1568
|
-
a = zeros(3, fill_value=0., dtype=complex)
|
|
1569
|
-
assert_equal(a.fill_value, 0.)
|
|
1570
|
-
#
|
|
1571
|
-
a = identity(3, fill_value=0., dtype=complex)
|
|
1572
|
-
assert_equal(a.fill_value, 0.)
|
|
1573
|
-
|
|
1574
|
-
def test_fillvalue_in_view(self):
|
|
1575
|
-
# Test the behavior of fill_value in view
|
|
1576
|
-
|
|
1577
|
-
# Create initial masked array
|
|
1578
|
-
x = array([1, 2, 3], fill_value=1, dtype=np.int64)
|
|
1579
|
-
|
|
1580
|
-
# Check that fill_value is preserved by default
|
|
1581
|
-
y = x.view()
|
|
1582
|
-
assert_(y.fill_value == 1)
|
|
1583
|
-
|
|
1584
|
-
# Check that fill_value is preserved if dtype is specified and the
|
|
1585
|
-
# dtype is an ndarray sub-class and has a _fill_value attribute
|
|
1586
|
-
y = x.view(MaskedArray)
|
|
1587
|
-
assert_(y.fill_value == 1)
|
|
1588
|
-
|
|
1589
|
-
# Check that fill_value is preserved if type is specified and the
|
|
1590
|
-
# dtype is an ndarray sub-class and has a _fill_value attribute (by
|
|
1591
|
-
# default, the first argument is dtype, not type)
|
|
1592
|
-
y = x.view(type=MaskedArray)
|
|
1593
|
-
assert_(y.fill_value == 1)
|
|
1594
|
-
|
|
1595
|
-
# Check that code does not crash if passed an ndarray sub-class that
|
|
1596
|
-
# does not have a _fill_value attribute
|
|
1597
|
-
y = x.view(np.ndarray)
|
|
1598
|
-
y = x.view(type=np.ndarray)
|
|
1599
|
-
|
|
1600
|
-
# Check that fill_value can be overriden with view
|
|
1601
|
-
y = x.view(MaskedArray, fill_value=2)
|
|
1602
|
-
assert_(y.fill_value == 2)
|
|
1603
|
-
|
|
1604
|
-
# Check that fill_value can be overriden with view (using type=)
|
|
1605
|
-
y = x.view(type=MaskedArray, fill_value=2)
|
|
1606
|
-
assert_(y.fill_value == 2)
|
|
1607
|
-
|
|
1608
|
-
# Check that fill_value gets reset if passed a dtype but not a
|
|
1609
|
-
# fill_value. This is because even though in some cases one can safely
|
|
1610
|
-
# cast the fill_value, e.g. if taking an int64 view of an int32 array,
|
|
1611
|
-
# in other cases, this cannot be done (e.g. int32 view of an int64
|
|
1612
|
-
# array with a large fill_value).
|
|
1613
|
-
y = x.view(dtype=np.int32)
|
|
1614
|
-
assert_(y.fill_value == 999999)
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
#------------------------------------------------------------------------------
|
|
1618
|
-
class TestUfuncs(TestCase):
|
|
1619
|
-
# Test class for the application of ufuncs on MaskedArrays.
|
|
1620
|
-
|
|
1621
|
-
def setUp(self):
|
|
1622
|
-
# Base data definition.
|
|
1623
|
-
self.d = (array([1.0, 0, -1, pi / 2] * 2, mask=[0, 1] + [0] * 6),
|
|
1624
|
-
array([1.0, 0, -1, pi / 2] * 2, mask=[1, 0] + [0] * 6),)
|
|
1625
|
-
self.err_status = np.geterr()
|
|
1626
|
-
np.seterr(divide='ignore', invalid='ignore')
|
|
1627
|
-
|
|
1628
|
-
def tearDown(self):
|
|
1629
|
-
np.seterr(**self.err_status)
|
|
1630
|
-
|
|
1631
|
-
def test_testUfuncRegression(self):
|
|
1632
|
-
# Tests new ufuncs on MaskedArrays.
|
|
1633
|
-
for f in ['sqrt', 'log', 'log10', 'exp', 'conjugate',
|
|
1634
|
-
'sin', 'cos', 'tan',
|
|
1635
|
-
'arcsin', 'arccos', 'arctan',
|
|
1636
|
-
'sinh', 'cosh', 'tanh',
|
|
1637
|
-
'arcsinh',
|
|
1638
|
-
'arccosh',
|
|
1639
|
-
'arctanh',
|
|
1640
|
-
'absolute', 'fabs', 'negative',
|
|
1641
|
-
# 'nonzero', 'around',
|
|
1642
|
-
'floor', 'ceil',
|
|
1643
|
-
# 'sometrue', 'alltrue',
|
|
1644
|
-
'logical_not',
|
|
1645
|
-
'add', 'subtract', 'multiply',
|
|
1646
|
-
'divide', 'true_divide', 'floor_divide',
|
|
1647
|
-
'remainder', 'fmod', 'hypot', 'arctan2',
|
|
1648
|
-
'equal', 'not_equal', 'less_equal', 'greater_equal',
|
|
1649
|
-
'less', 'greater',
|
|
1650
|
-
'logical_and', 'logical_or', 'logical_xor',
|
|
1651
|
-
]:
|
|
1652
|
-
try:
|
|
1653
|
-
uf = getattr(umath, f)
|
|
1654
|
-
except AttributeError:
|
|
1655
|
-
uf = getattr(fromnumeric, f)
|
|
1656
|
-
mf = getattr(numpy.ma.core, f)
|
|
1657
|
-
args = self.d[:uf.nin]
|
|
1658
|
-
ur = uf(*args)
|
|
1659
|
-
mr = mf(*args)
|
|
1660
|
-
assert_equal(ur.filled(0), mr.filled(0), f)
|
|
1661
|
-
assert_mask_equal(ur.mask, mr.mask, err_msg=f)
|
|
1662
|
-
|
|
1663
|
-
def test_reduce(self):
|
|
1664
|
-
# Tests reduce on MaskedArrays.
|
|
1665
|
-
a = self.d[0]
|
|
1666
|
-
self.assertTrue(not alltrue(a, axis=0))
|
|
1667
|
-
self.assertTrue(sometrue(a, axis=0))
|
|
1668
|
-
assert_equal(sum(a[:3], axis=0), 0)
|
|
1669
|
-
assert_equal(product(a, axis=0), 0)
|
|
1670
|
-
assert_equal(add.reduce(a), pi)
|
|
1671
|
-
|
|
1672
|
-
def test_minmax(self):
|
|
1673
|
-
# Tests extrema on MaskedArrays.
|
|
1674
|
-
a = arange(1, 13).reshape(3, 4)
|
|
1675
|
-
amask = masked_where(a < 5, a)
|
|
1676
|
-
assert_equal(amask.max(), a.max())
|
|
1677
|
-
assert_equal(amask.min(), 5)
|
|
1678
|
-
assert_equal(amask.max(0), a.max(0))
|
|
1679
|
-
assert_equal(amask.min(0), [5, 6, 7, 8])
|
|
1680
|
-
self.assertTrue(amask.max(1)[0].mask)
|
|
1681
|
-
self.assertTrue(amask.min(1)[0].mask)
|
|
1682
|
-
|
|
1683
|
-
def test_ndarray_mask(self):
|
|
1684
|
-
# Check that the mask of the result is a ndarray (not a MaskedArray...)
|
|
1685
|
-
a = masked_array([-1, 0, 1, 2, 3], mask=[0, 0, 0, 0, 1])
|
|
1686
|
-
test = np.sqrt(a)
|
|
1687
|
-
control = masked_array([-1, 0, 1, np.sqrt(2), -1],
|
|
1688
|
-
mask=[1, 0, 0, 0, 1])
|
|
1689
|
-
assert_equal(test, control)
|
|
1690
|
-
assert_equal(test.mask, control.mask)
|
|
1691
|
-
self.assertTrue(not isinstance(test.mask, MaskedArray))
|
|
1692
|
-
|
|
1693
|
-
def test_treatment_of_NotImplemented(self):
|
|
1694
|
-
# Check any NotImplemented returned by umath.<ufunc> is passed on
|
|
1695
|
-
a = masked_array([1., 2.], mask=[1, 0])
|
|
1696
|
-
# basic tests for _MaskedBinaryOperation
|
|
1697
|
-
assert_(a.__mul__('abc') is NotImplemented)
|
|
1698
|
-
assert_(multiply.outer(a, 'abc') is NotImplemented)
|
|
1699
|
-
# and for _DomainedBinaryOperation
|
|
1700
|
-
assert_(a.__div__('abc') is NotImplemented)
|
|
1701
|
-
|
|
1702
|
-
# also check explicitly that rmul of another class can be accessed
|
|
1703
|
-
class MyClass(str):
|
|
1704
|
-
def __mul__(self, other):
|
|
1705
|
-
return "My mul"
|
|
1706
|
-
|
|
1707
|
-
def __rmul__(self, other):
|
|
1708
|
-
return "My rmul"
|
|
1709
|
-
|
|
1710
|
-
me = MyClass()
|
|
1711
|
-
assert_(me * a == "My mul")
|
|
1712
|
-
assert_(a * me == "My rmul")
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
#------------------------------------------------------------------------------
|
|
1716
|
-
class TestMaskedArrayInPlaceArithmetics(TestCase):
|
|
1717
|
-
# Test MaskedArray Arithmetics
|
|
1718
|
-
|
|
1719
|
-
def setUp(self):
|
|
1720
|
-
x = arange(10)
|
|
1721
|
-
y = arange(10)
|
|
1722
|
-
xm = arange(10)
|
|
1723
|
-
xm[2] = masked
|
|
1724
|
-
self.intdata = (x, y, xm)
|
|
1725
|
-
self.floatdata = (x.astype(float), y.astype(float), xm.astype(float))
|
|
1726
|
-
|
|
1727
|
-
def test_inplace_addition_scalar(self):
|
|
1728
|
-
# Test of inplace additions
|
|
1729
|
-
(x, y, xm) = self.intdata
|
|
1730
|
-
xm[2] = masked
|
|
1731
|
-
x += 1
|
|
1732
|
-
assert_equal(x, y + 1)
|
|
1733
|
-
xm += 1
|
|
1734
|
-
assert_equal(xm, y + 1)
|
|
1735
|
-
#
|
|
1736
|
-
(x, _, xm) = self.floatdata
|
|
1737
|
-
id1 = x.data.ctypes._data
|
|
1738
|
-
x += 1.
|
|
1739
|
-
assert_(id1 == x.data.ctypes._data)
|
|
1740
|
-
assert_equal(x, y + 1.)
|
|
1741
|
-
|
|
1742
|
-
def test_inplace_addition_array(self):
|
|
1743
|
-
# Test of inplace additions
|
|
1744
|
-
(x, y, xm) = self.intdata
|
|
1745
|
-
m = xm.mask
|
|
1746
|
-
a = arange(10, dtype=np.int16)
|
|
1747
|
-
a[-1] = masked
|
|
1748
|
-
x += a
|
|
1749
|
-
xm += a
|
|
1750
|
-
assert_equal(x, y + a)
|
|
1751
|
-
assert_equal(xm, y + a)
|
|
1752
|
-
assert_equal(xm.mask, mask_or(m, a.mask))
|
|
1753
|
-
|
|
1754
|
-
def test_inplace_subtraction_scalar(self):
|
|
1755
|
-
# Test of inplace subtractions
|
|
1756
|
-
(x, y, xm) = self.intdata
|
|
1757
|
-
x -= 1
|
|
1758
|
-
assert_equal(x, y - 1)
|
|
1759
|
-
xm -= 1
|
|
1760
|
-
assert_equal(xm, y - 1)
|
|
1761
|
-
|
|
1762
|
-
def test_inplace_subtraction_array(self):
|
|
1763
|
-
# Test of inplace subtractions
|
|
1764
|
-
(x, y, xm) = self.floatdata
|
|
1765
|
-
m = xm.mask
|
|
1766
|
-
a = arange(10, dtype=float)
|
|
1767
|
-
a[-1] = masked
|
|
1768
|
-
x -= a
|
|
1769
|
-
xm -= a
|
|
1770
|
-
assert_equal(x, y - a)
|
|
1771
|
-
assert_equal(xm, y - a)
|
|
1772
|
-
assert_equal(xm.mask, mask_or(m, a.mask))
|
|
1773
|
-
|
|
1774
|
-
def test_inplace_multiplication_scalar(self):
|
|
1775
|
-
# Test of inplace multiplication
|
|
1776
|
-
(x, y, xm) = self.floatdata
|
|
1777
|
-
x *= 2.0
|
|
1778
|
-
assert_equal(x, y * 2)
|
|
1779
|
-
xm *= 2.0
|
|
1780
|
-
assert_equal(xm, y * 2)
|
|
1781
|
-
|
|
1782
|
-
def test_inplace_multiplication_array(self):
|
|
1783
|
-
# Test of inplace multiplication
|
|
1784
|
-
(x, y, xm) = self.floatdata
|
|
1785
|
-
m = xm.mask
|
|
1786
|
-
a = arange(10, dtype=float)
|
|
1787
|
-
a[-1] = masked
|
|
1788
|
-
x *= a
|
|
1789
|
-
xm *= a
|
|
1790
|
-
assert_equal(x, y * a)
|
|
1791
|
-
assert_equal(xm, y * a)
|
|
1792
|
-
assert_equal(xm.mask, mask_or(m, a.mask))
|
|
1793
|
-
|
|
1794
|
-
def test_inplace_division_scalar_int(self):
|
|
1795
|
-
# Test of inplace division
|
|
1796
|
-
(x, y, xm) = self.intdata
|
|
1797
|
-
x = arange(10) * 2
|
|
1798
|
-
xm = arange(10) * 2
|
|
1799
|
-
xm[2] = masked
|
|
1800
|
-
x //= 2
|
|
1801
|
-
assert_equal(x, y)
|
|
1802
|
-
xm //= 2
|
|
1803
|
-
assert_equal(xm, y)
|
|
1804
|
-
|
|
1805
|
-
def test_inplace_division_scalar_float(self):
|
|
1806
|
-
# Test of inplace division
|
|
1807
|
-
(x, y, xm) = self.floatdata
|
|
1808
|
-
x /= 2.0
|
|
1809
|
-
assert_equal(x, y / 2.0)
|
|
1810
|
-
xm /= arange(10)
|
|
1811
|
-
assert_equal(xm, ones((10,)))
|
|
1812
|
-
|
|
1813
|
-
def test_inplace_division_array_float(self):
|
|
1814
|
-
# Test of inplace division
|
|
1815
|
-
(x, y, xm) = self.floatdata
|
|
1816
|
-
m = xm.mask
|
|
1817
|
-
a = arange(10, dtype=float)
|
|
1818
|
-
a[-1] = masked
|
|
1819
|
-
x /= a
|
|
1820
|
-
xm /= a
|
|
1821
|
-
assert_equal(x, y / a)
|
|
1822
|
-
assert_equal(xm, y / a)
|
|
1823
|
-
assert_equal(xm.mask, mask_or(mask_or(m, a.mask), (a == 0)))
|
|
1824
|
-
|
|
1825
|
-
def test_inplace_division_misc(self):
|
|
1826
|
-
#
|
|
1827
|
-
x = [1., 1., 1., -2., pi / 2., 4., 5., -10., 10., 1., 2., 3.]
|
|
1828
|
-
y = [5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.]
|
|
1829
|
-
m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
|
1830
|
-
m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
|
|
1831
|
-
xm = masked_array(x, mask=m1)
|
|
1832
|
-
ym = masked_array(y, mask=m2)
|
|
1833
|
-
#
|
|
1834
|
-
z = xm / ym
|
|
1835
|
-
assert_equal(z._mask, [1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1])
|
|
1836
|
-
assert_equal(z._data,
|
|
1837
|
-
[1., 1., 1., -1., -pi / 2., 4., 5., 1., 1., 1., 2., 3.])
|
|
1838
|
-
#assert_equal(z._data, [0.2,1.,1./3.,-1.,-pi/2.,-1.,5.,1.,1.,1.,2.,1.])
|
|
1839
|
-
#
|
|
1840
|
-
xm = xm.copy()
|
|
1841
|
-
xm /= ym
|
|
1842
|
-
assert_equal(xm._mask, [1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1])
|
|
1843
|
-
assert_equal(z._data,
|
|
1844
|
-
[1., 1., 1., -1., -pi / 2., 4., 5., 1., 1., 1., 2., 3.])
|
|
1845
|
-
#assert_equal(xm._data,
|
|
1846
|
-
# [1/5.,1.,1./3.,-1.,-pi/2.,-1.,5.,1.,1.,1.,2.,1.])
|
|
1847
|
-
|
|
1848
|
-
def test_datafriendly_add(self):
|
|
1849
|
-
# Test keeping data w/ (inplace) addition
|
|
1850
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1851
|
-
# Test add w/ scalar
|
|
1852
|
-
xx = x + 1
|
|
1853
|
-
assert_equal(xx.data, [2, 3, 3])
|
|
1854
|
-
assert_equal(xx.mask, [0, 0, 1])
|
|
1855
|
-
# Test iadd w/ scalar
|
|
1856
|
-
x += 1
|
|
1857
|
-
assert_equal(x.data, [2, 3, 3])
|
|
1858
|
-
assert_equal(x.mask, [0, 0, 1])
|
|
1859
|
-
# Test add w/ array
|
|
1860
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1861
|
-
xx = x + array([1, 2, 3], mask=[1, 0, 0])
|
|
1862
|
-
assert_equal(xx.data, [1, 4, 3])
|
|
1863
|
-
assert_equal(xx.mask, [1, 0, 1])
|
|
1864
|
-
# Test iadd w/ array
|
|
1865
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1866
|
-
x += array([1, 2, 3], mask=[1, 0, 0])
|
|
1867
|
-
assert_equal(x.data, [1, 4, 3])
|
|
1868
|
-
assert_equal(x.mask, [1, 0, 1])
|
|
1869
|
-
|
|
1870
|
-
def test_datafriendly_sub(self):
|
|
1871
|
-
# Test keeping data w/ (inplace) subtraction
|
|
1872
|
-
# Test sub w/ scalar
|
|
1873
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1874
|
-
xx = x - 1
|
|
1875
|
-
assert_equal(xx.data, [0, 1, 3])
|
|
1876
|
-
assert_equal(xx.mask, [0, 0, 1])
|
|
1877
|
-
# Test isub w/ scalar
|
|
1878
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1879
|
-
x -= 1
|
|
1880
|
-
assert_equal(x.data, [0, 1, 3])
|
|
1881
|
-
assert_equal(x.mask, [0, 0, 1])
|
|
1882
|
-
# Test sub w/ array
|
|
1883
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1884
|
-
xx = x - array([1, 2, 3], mask=[1, 0, 0])
|
|
1885
|
-
assert_equal(xx.data, [1, 0, 3])
|
|
1886
|
-
assert_equal(xx.mask, [1, 0, 1])
|
|
1887
|
-
# Test isub w/ array
|
|
1888
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1889
|
-
x -= array([1, 2, 3], mask=[1, 0, 0])
|
|
1890
|
-
assert_equal(x.data, [1, 0, 3])
|
|
1891
|
-
assert_equal(x.mask, [1, 0, 1])
|
|
1892
|
-
|
|
1893
|
-
def test_datafriendly_mul(self):
|
|
1894
|
-
# Test keeping data w/ (inplace) multiplication
|
|
1895
|
-
# Test mul w/ scalar
|
|
1896
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1897
|
-
xx = x * 2
|
|
1898
|
-
assert_equal(xx.data, [2, 4, 3])
|
|
1899
|
-
assert_equal(xx.mask, [0, 0, 1])
|
|
1900
|
-
# Test imul w/ scalar
|
|
1901
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1902
|
-
x *= 2
|
|
1903
|
-
assert_equal(x.data, [2, 4, 3])
|
|
1904
|
-
assert_equal(x.mask, [0, 0, 1])
|
|
1905
|
-
# Test mul w/ array
|
|
1906
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1907
|
-
xx = x * array([10, 20, 30], mask=[1, 0, 0])
|
|
1908
|
-
assert_equal(xx.data, [1, 40, 3])
|
|
1909
|
-
assert_equal(xx.mask, [1, 0, 1])
|
|
1910
|
-
# Test imul w/ array
|
|
1911
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1912
|
-
x *= array([10, 20, 30], mask=[1, 0, 0])
|
|
1913
|
-
assert_equal(x.data, [1, 40, 3])
|
|
1914
|
-
assert_equal(x.mask, [1, 0, 1])
|
|
1915
|
-
|
|
1916
|
-
def test_datafriendly_div(self):
|
|
1917
|
-
# Test keeping data w/ (inplace) division
|
|
1918
|
-
# Test div on scalar
|
|
1919
|
-
x = array([1, 2, 3], mask=[0, 0, 1])
|
|
1920
|
-
xx = x / 2.
|
|
1921
|
-
assert_equal(xx.data, [1 / 2., 2 / 2., 3])
|
|
1922
|
-
assert_equal(xx.mask, [0, 0, 1])
|
|
1923
|
-
# Test idiv on scalar
|
|
1924
|
-
x = array([1., 2., 3.], mask=[0, 0, 1])
|
|
1925
|
-
x /= 2.
|
|
1926
|
-
assert_equal(x.data, [1 / 2., 2 / 2., 3])
|
|
1927
|
-
assert_equal(x.mask, [0, 0, 1])
|
|
1928
|
-
# Test div on array
|
|
1929
|
-
x = array([1., 2., 3.], mask=[0, 0, 1])
|
|
1930
|
-
xx = x / array([10., 20., 30.], mask=[1, 0, 0])
|
|
1931
|
-
assert_equal(xx.data, [1., 2. / 20., 3.])
|
|
1932
|
-
assert_equal(xx.mask, [1, 0, 1])
|
|
1933
|
-
# Test idiv on array
|
|
1934
|
-
x = array([1., 2., 3.], mask=[0, 0, 1])
|
|
1935
|
-
x /= array([10., 20., 30.], mask=[1, 0, 0])
|
|
1936
|
-
assert_equal(x.data, [1., 2 / 20., 3.])
|
|
1937
|
-
assert_equal(x.mask, [1, 0, 1])
|
|
1938
|
-
|
|
1939
|
-
def test_datafriendly_pow(self):
|
|
1940
|
-
# Test keeping data w/ (inplace) power
|
|
1941
|
-
# Test pow on scalar
|
|
1942
|
-
x = array([1., 2., 3.], mask=[0, 0, 1])
|
|
1943
|
-
xx = x ** 2.5
|
|
1944
|
-
assert_equal(xx.data, [1., 2. ** 2.5, 3.])
|
|
1945
|
-
assert_equal(xx.mask, [0, 0, 1])
|
|
1946
|
-
# Test ipow on scalar
|
|
1947
|
-
x **= 2.5
|
|
1948
|
-
assert_equal(x.data, [1., 2. ** 2.5, 3])
|
|
1949
|
-
assert_equal(x.mask, [0, 0, 1])
|
|
1950
|
-
|
|
1951
|
-
def test_datafriendly_add_arrays(self):
|
|
1952
|
-
a = array([[1, 1], [3, 3]])
|
|
1953
|
-
b = array([1, 1], mask=[0, 0])
|
|
1954
|
-
a += b
|
|
1955
|
-
assert_equal(a, [[2, 2], [4, 4]])
|
|
1956
|
-
if a.mask is not nomask:
|
|
1957
|
-
assert_equal(a.mask, [[0, 0], [0, 0]])
|
|
1958
|
-
#
|
|
1959
|
-
a = array([[1, 1], [3, 3]])
|
|
1960
|
-
b = array([1, 1], mask=[0, 1])
|
|
1961
|
-
a += b
|
|
1962
|
-
assert_equal(a, [[2, 2], [4, 4]])
|
|
1963
|
-
assert_equal(a.mask, [[0, 1], [0, 1]])
|
|
1964
|
-
|
|
1965
|
-
def test_datafriendly_sub_arrays(self):
|
|
1966
|
-
a = array([[1, 1], [3, 3]])
|
|
1967
|
-
b = array([1, 1], mask=[0, 0])
|
|
1968
|
-
a -= b
|
|
1969
|
-
assert_equal(a, [[0, 0], [2, 2]])
|
|
1970
|
-
if a.mask is not nomask:
|
|
1971
|
-
assert_equal(a.mask, [[0, 0], [0, 0]])
|
|
1972
|
-
#
|
|
1973
|
-
a = array([[1, 1], [3, 3]])
|
|
1974
|
-
b = array([1, 1], mask=[0, 1])
|
|
1975
|
-
a -= b
|
|
1976
|
-
assert_equal(a, [[0, 0], [2, 2]])
|
|
1977
|
-
assert_equal(a.mask, [[0, 1], [0, 1]])
|
|
1978
|
-
|
|
1979
|
-
def test_datafriendly_mul_arrays(self):
|
|
1980
|
-
a = array([[1, 1], [3, 3]])
|
|
1981
|
-
b = array([1, 1], mask=[0, 0])
|
|
1982
|
-
a *= b
|
|
1983
|
-
assert_equal(a, [[1, 1], [3, 3]])
|
|
1984
|
-
if a.mask is not nomask:
|
|
1985
|
-
assert_equal(a.mask, [[0, 0], [0, 0]])
|
|
1986
|
-
#
|
|
1987
|
-
a = array([[1, 1], [3, 3]])
|
|
1988
|
-
b = array([1, 1], mask=[0, 1])
|
|
1989
|
-
a *= b
|
|
1990
|
-
assert_equal(a, [[1, 1], [3, 3]])
|
|
1991
|
-
assert_equal(a.mask, [[0, 1], [0, 1]])
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
#------------------------------------------------------------------------------
|
|
1995
|
-
class TestMaskedArrayMethods(TestCase):
|
|
1996
|
-
# Test class for miscellaneous MaskedArrays methods.
|
|
1997
|
-
def setUp(self):
|
|
1998
|
-
# Base data definition.
|
|
1999
|
-
x = np.array([8.375, 7.545, 8.828, 8.5, 1.757, 5.928,
|
|
2000
|
-
8.43, 7.78, 9.865, 5.878, 8.979, 4.732,
|
|
2001
|
-
3.012, 6.022, 5.095, 3.116, 5.238, 3.957,
|
|
2002
|
-
6.04, 9.63, 7.712, 3.382, 4.489, 6.479,
|
|
2003
|
-
7.189, 9.645, 5.395, 4.961, 9.894, 2.893,
|
|
2004
|
-
7.357, 9.828, 6.272, 3.758, 6.693, 0.993])
|
|
2005
|
-
X = x.reshape(6, 6)
|
|
2006
|
-
XX = x.reshape(3, 2, 2, 3)
|
|
2007
|
-
|
|
2008
|
-
m = np.array([0, 1, 0, 1, 0, 0,
|
|
2009
|
-
1, 0, 1, 1, 0, 1,
|
|
2010
|
-
0, 0, 0, 1, 0, 1,
|
|
2011
|
-
0, 0, 0, 1, 1, 1,
|
|
2012
|
-
1, 0, 0, 1, 0, 0,
|
|
2013
|
-
0, 0, 1, 0, 1, 0])
|
|
2014
|
-
mx = array(data=x, mask=m)
|
|
2015
|
-
mX = array(data=X, mask=m.reshape(X.shape))
|
|
2016
|
-
mXX = array(data=XX, mask=m.reshape(XX.shape))
|
|
2017
|
-
|
|
2018
|
-
m2 = np.array([1, 1, 0, 1, 0, 0,
|
|
2019
|
-
1, 1, 1, 1, 0, 1,
|
|
2020
|
-
0, 0, 1, 1, 0, 1,
|
|
2021
|
-
0, 0, 0, 1, 1, 1,
|
|
2022
|
-
1, 0, 0, 1, 1, 0,
|
|
2023
|
-
0, 0, 1, 0, 1, 1])
|
|
2024
|
-
m2x = array(data=x, mask=m2)
|
|
2025
|
-
m2X = array(data=X, mask=m2.reshape(X.shape))
|
|
2026
|
-
m2XX = array(data=XX, mask=m2.reshape(XX.shape))
|
|
2027
|
-
self.d = (x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX)
|
|
2028
|
-
|
|
2029
|
-
def test_generic_methods(self):
|
|
2030
|
-
# Tests some MaskedArray methods.
|
|
2031
|
-
a = array([1, 3, 2])
|
|
2032
|
-
assert_equal(a.any(), a._data.any())
|
|
2033
|
-
assert_equal(a.all(), a._data.all())
|
|
2034
|
-
assert_equal(a.argmax(), a._data.argmax())
|
|
2035
|
-
assert_equal(a.argmin(), a._data.argmin())
|
|
2036
|
-
assert_equal(a.choose(0, 1, 2, 3, 4), a._data.choose(0, 1, 2, 3, 4))
|
|
2037
|
-
assert_equal(a.compress([1, 0, 1]), a._data.compress([1, 0, 1]))
|
|
2038
|
-
assert_equal(a.conj(), a._data.conj())
|
|
2039
|
-
assert_equal(a.conjugate(), a._data.conjugate())
|
|
2040
|
-
#
|
|
2041
|
-
m = array([[1, 2], [3, 4]])
|
|
2042
|
-
assert_equal(m.diagonal(), m._data.diagonal())
|
|
2043
|
-
assert_equal(a.sum(), a._data.sum())
|
|
2044
|
-
assert_equal(a.take([1, 2]), a._data.take([1, 2]))
|
|
2045
|
-
assert_equal(m.transpose(), m._data.transpose())
|
|
2046
|
-
|
|
2047
|
-
def test_allclose(self):
|
|
2048
|
-
# Tests allclose on arrays
|
|
2049
|
-
a = np.random.rand(10)
|
|
2050
|
-
b = a + np.random.rand(10) * 1e-8
|
|
2051
|
-
self.assertTrue(allclose(a, b))
|
|
2052
|
-
# Test allclose w/ infs
|
|
2053
|
-
a[0] = np.inf
|
|
2054
|
-
self.assertTrue(not allclose(a, b))
|
|
2055
|
-
b[0] = np.inf
|
|
2056
|
-
self.assertTrue(allclose(a, b))
|
|
2057
|
-
# Test all close w/ masked
|
|
2058
|
-
a = masked_array(a)
|
|
2059
|
-
a[-1] = masked
|
|
2060
|
-
self.assertTrue(allclose(a, b, masked_equal=True))
|
|
2061
|
-
self.assertTrue(not allclose(a, b, masked_equal=False))
|
|
2062
|
-
# Test comparison w/ scalar
|
|
2063
|
-
a *= 1e-8
|
|
2064
|
-
a[0] = 0
|
|
2065
|
-
self.assertTrue(allclose(a, 0, masked_equal=True))
|
|
2066
|
-
|
|
2067
|
-
# Test that the function works for MIN_INT integer typed arrays
|
|
2068
|
-
a = masked_array([np.iinfo(np.int_).min], dtype=np.int_)
|
|
2069
|
-
self.assertTrue(allclose(a, a))
|
|
2070
|
-
|
|
2071
|
-
def test_allany(self):
|
|
2072
|
-
# Checks the any/all methods/functions.
|
|
2073
|
-
x = np.array([[0.13, 0.26, 0.90],
|
|
2074
|
-
[0.28, 0.33, 0.63],
|
|
2075
|
-
[0.31, 0.87, 0.70]])
|
|
2076
|
-
m = np.array([[True, False, False],
|
|
2077
|
-
[False, False, False],
|
|
2078
|
-
[True, True, False]], dtype=np.bool_)
|
|
2079
|
-
mx = masked_array(x, mask=m)
|
|
2080
|
-
mxbig = (mx > 0.5)
|
|
2081
|
-
mxsmall = (mx < 0.5)
|
|
2082
|
-
#
|
|
2083
|
-
self.assertFalse(mxbig.all())
|
|
2084
|
-
self.assertTrue(mxbig.any())
|
|
2085
|
-
assert_equal(mxbig.all(0), [False, False, True])
|
|
2086
|
-
assert_equal(mxbig.all(1), [False, False, True])
|
|
2087
|
-
assert_equal(mxbig.any(0), [False, False, True])
|
|
2088
|
-
assert_equal(mxbig.any(1), [True, True, True])
|
|
2089
|
-
#
|
|
2090
|
-
self.assertFalse(mxsmall.all())
|
|
2091
|
-
self.assertTrue(mxsmall.any())
|
|
2092
|
-
assert_equal(mxsmall.all(0), [True, True, False])
|
|
2093
|
-
assert_equal(mxsmall.all(1), [False, False, False])
|
|
2094
|
-
assert_equal(mxsmall.any(0), [True, True, False])
|
|
2095
|
-
assert_equal(mxsmall.any(1), [True, True, False])
|
|
2096
|
-
|
|
2097
|
-
def test_allany_onmatrices(self):
|
|
2098
|
-
x = np.array([[0.13, 0.26, 0.90],
|
|
2099
|
-
[0.28, 0.33, 0.63],
|
|
2100
|
-
[0.31, 0.87, 0.70]])
|
|
2101
|
-
X = np.matrix(x)
|
|
2102
|
-
m = np.array([[True, False, False],
|
|
2103
|
-
[False, False, False],
|
|
2104
|
-
[True, True, False]], dtype=np.bool_)
|
|
2105
|
-
mX = masked_array(X, mask=m)
|
|
2106
|
-
mXbig = (mX > 0.5)
|
|
2107
|
-
mXsmall = (mX < 0.5)
|
|
2108
|
-
#
|
|
2109
|
-
self.assertFalse(mXbig.all())
|
|
2110
|
-
self.assertTrue(mXbig.any())
|
|
2111
|
-
assert_equal(mXbig.all(0), np.matrix([False, False, True]))
|
|
2112
|
-
assert_equal(mXbig.all(1), np.matrix([False, False, True]).T)
|
|
2113
|
-
assert_equal(mXbig.any(0), np.matrix([False, False, True]))
|
|
2114
|
-
assert_equal(mXbig.any(1), np.matrix([True, True, True]).T)
|
|
2115
|
-
#
|
|
2116
|
-
self.assertFalse(mXsmall.all())
|
|
2117
|
-
self.assertTrue(mXsmall.any())
|
|
2118
|
-
assert_equal(mXsmall.all(0), np.matrix([True, True, False]))
|
|
2119
|
-
assert_equal(mXsmall.all(1), np.matrix([False, False, False]).T)
|
|
2120
|
-
assert_equal(mXsmall.any(0), np.matrix([True, True, False]))
|
|
2121
|
-
assert_equal(mXsmall.any(1), np.matrix([True, True, False]).T)
|
|
2122
|
-
|
|
2123
|
-
def test_allany_oddities(self):
|
|
2124
|
-
# Some fun with all and any
|
|
2125
|
-
store = empty((), dtype=bool)
|
|
2126
|
-
full = array([1, 2, 3], mask=True)
|
|
2127
|
-
#
|
|
2128
|
-
self.assertTrue(full.all() is masked)
|
|
2129
|
-
full.all(out=store)
|
|
2130
|
-
self.assertTrue(store)
|
|
2131
|
-
self.assertTrue(store._mask, True)
|
|
2132
|
-
self.assertTrue(store is not masked)
|
|
2133
|
-
#
|
|
2134
|
-
store = empty((), dtype=bool)
|
|
2135
|
-
self.assertTrue(full.any() is masked)
|
|
2136
|
-
full.any(out=store)
|
|
2137
|
-
self.assertTrue(not store)
|
|
2138
|
-
self.assertTrue(store._mask, True)
|
|
2139
|
-
self.assertTrue(store is not masked)
|
|
2140
|
-
|
|
2141
|
-
def test_argmax_argmin(self):
|
|
2142
|
-
# Tests argmin & argmax on MaskedArrays.
|
|
2143
|
-
(x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX) = self.d
|
|
2144
|
-
#
|
|
2145
|
-
assert_equal(mx.argmin(), 35)
|
|
2146
|
-
assert_equal(mX.argmin(), 35)
|
|
2147
|
-
assert_equal(m2x.argmin(), 4)
|
|
2148
|
-
assert_equal(m2X.argmin(), 4)
|
|
2149
|
-
assert_equal(mx.argmax(), 28)
|
|
2150
|
-
assert_equal(mX.argmax(), 28)
|
|
2151
|
-
assert_equal(m2x.argmax(), 31)
|
|
2152
|
-
assert_equal(m2X.argmax(), 31)
|
|
2153
|
-
#
|
|
2154
|
-
assert_equal(mX.argmin(0), [2, 2, 2, 5, 0, 5])
|
|
2155
|
-
assert_equal(m2X.argmin(0), [2, 2, 4, 5, 0, 4])
|
|
2156
|
-
assert_equal(mX.argmax(0), [0, 5, 0, 5, 4, 0])
|
|
2157
|
-
assert_equal(m2X.argmax(0), [5, 5, 0, 5, 1, 0])
|
|
2158
|
-
#
|
|
2159
|
-
assert_equal(mX.argmin(1), [4, 1, 0, 0, 5, 5, ])
|
|
2160
|
-
assert_equal(m2X.argmin(1), [4, 4, 0, 0, 5, 3])
|
|
2161
|
-
assert_equal(mX.argmax(1), [2, 4, 1, 1, 4, 1])
|
|
2162
|
-
assert_equal(m2X.argmax(1), [2, 4, 1, 1, 1, 1])
|
|
2163
|
-
|
|
2164
|
-
def test_clip(self):
|
|
2165
|
-
# Tests clip on MaskedArrays.
|
|
2166
|
-
x = np.array([8.375, 7.545, 8.828, 8.5, 1.757, 5.928,
|
|
2167
|
-
8.43, 7.78, 9.865, 5.878, 8.979, 4.732,
|
|
2168
|
-
3.012, 6.022, 5.095, 3.116, 5.238, 3.957,
|
|
2169
|
-
6.04, 9.63, 7.712, 3.382, 4.489, 6.479,
|
|
2170
|
-
7.189, 9.645, 5.395, 4.961, 9.894, 2.893,
|
|
2171
|
-
7.357, 9.828, 6.272, 3.758, 6.693, 0.993])
|
|
2172
|
-
m = np.array([0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1,
|
|
2173
|
-
0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1,
|
|
2174
|
-
1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0])
|
|
2175
|
-
mx = array(x, mask=m)
|
|
2176
|
-
clipped = mx.clip(2, 8)
|
|
2177
|
-
assert_equal(clipped.mask, mx.mask)
|
|
2178
|
-
assert_equal(clipped._data, x.clip(2, 8))
|
|
2179
|
-
assert_equal(clipped._data, mx._data.clip(2, 8))
|
|
2180
|
-
|
|
2181
|
-
def test_compress(self):
|
|
2182
|
-
# test compress
|
|
2183
|
-
a = masked_array([1., 2., 3., 4., 5.], fill_value=9999)
|
|
2184
|
-
condition = (a > 1.5) & (a < 3.5)
|
|
2185
|
-
assert_equal(a.compress(condition), [2., 3.])
|
|
2186
|
-
#
|
|
2187
|
-
a[[2, 3]] = masked
|
|
2188
|
-
b = a.compress(condition)
|
|
2189
|
-
assert_equal(b._data, [2., 3.])
|
|
2190
|
-
assert_equal(b._mask, [0, 1])
|
|
2191
|
-
assert_equal(b.fill_value, 9999)
|
|
2192
|
-
assert_equal(b, a[condition])
|
|
2193
|
-
#
|
|
2194
|
-
condition = (a < 4.)
|
|
2195
|
-
b = a.compress(condition)
|
|
2196
|
-
assert_equal(b._data, [1., 2., 3.])
|
|
2197
|
-
assert_equal(b._mask, [0, 0, 1])
|
|
2198
|
-
assert_equal(b.fill_value, 9999)
|
|
2199
|
-
assert_equal(b, a[condition])
|
|
2200
|
-
#
|
|
2201
|
-
a = masked_array([[10, 20, 30], [40, 50, 60]],
|
|
2202
|
-
mask=[[0, 0, 1], [1, 0, 0]])
|
|
2203
|
-
b = a.compress(a.ravel() >= 22)
|
|
2204
|
-
assert_equal(b._data, [30, 40, 50, 60])
|
|
2205
|
-
assert_equal(b._mask, [1, 1, 0, 0])
|
|
2206
|
-
#
|
|
2207
|
-
x = np.array([3, 1, 2])
|
|
2208
|
-
b = a.compress(x >= 2, axis=1)
|
|
2209
|
-
assert_equal(b._data, [[10, 30], [40, 60]])
|
|
2210
|
-
assert_equal(b._mask, [[0, 1], [1, 0]])
|
|
2211
|
-
|
|
2212
|
-
def test_compressed(self):
|
|
2213
|
-
# Tests compressed
|
|
2214
|
-
a = array([1, 2, 3, 4], mask=[0, 0, 0, 0])
|
|
2215
|
-
b = a.compressed()
|
|
2216
|
-
assert_equal(b, a)
|
|
2217
|
-
a[0] = masked
|
|
2218
|
-
b = a.compressed()
|
|
2219
|
-
assert_equal(b, [2, 3, 4])
|
|
2220
|
-
#
|
|
2221
|
-
a = array(np.matrix([1, 2, 3, 4]), mask=[0, 0, 0, 0])
|
|
2222
|
-
b = a.compressed()
|
|
2223
|
-
assert_equal(b, a)
|
|
2224
|
-
self.assertTrue(isinstance(b, np.matrix))
|
|
2225
|
-
a[0, 0] = masked
|
|
2226
|
-
b = a.compressed()
|
|
2227
|
-
assert_equal(b, [[2, 3, 4]])
|
|
2228
|
-
|
|
2229
|
-
def test_empty(self):
|
|
2230
|
-
# Tests empty/like
|
|
2231
|
-
datatype = [('a', int), ('b', float), ('c', '|S8')]
|
|
2232
|
-
a = masked_array([(1, 1.1, '1.1'), (2, 2.2, '2.2'), (3, 3.3, '3.3')],
|
|
2233
|
-
dtype=datatype)
|
|
2234
|
-
assert_equal(len(a.fill_value.item()), len(datatype))
|
|
2235
|
-
#
|
|
2236
|
-
b = empty_like(a)
|
|
2237
|
-
assert_equal(b.shape, a.shape)
|
|
2238
|
-
assert_equal(b.fill_value, a.fill_value)
|
|
2239
|
-
#
|
|
2240
|
-
b = empty(len(a), dtype=datatype)
|
|
2241
|
-
assert_equal(b.shape, a.shape)
|
|
2242
|
-
assert_equal(b.fill_value, a.fill_value)
|
|
2243
|
-
|
|
2244
|
-
# check empty_like mask handling
|
|
2245
|
-
a = masked_array([1, 2, 3], mask=[False, True, False])
|
|
2246
|
-
b = empty_like(a)
|
|
2247
|
-
assert_(not np.may_share_memory(a.mask, b.mask))
|
|
2248
|
-
b = a.view(masked_array)
|
|
2249
|
-
assert_(np.may_share_memory(a.mask, b.mask))
|
|
2250
|
-
|
|
2251
|
-
def test_put(self):
|
|
2252
|
-
# Tests put.
|
|
2253
|
-
d = arange(5)
|
|
2254
|
-
n = [0, 0, 0, 1, 1]
|
|
2255
|
-
m = make_mask(n)
|
|
2256
|
-
x = array(d, mask=m)
|
|
2257
|
-
self.assertTrue(x[3] is masked)
|
|
2258
|
-
self.assertTrue(x[4] is masked)
|
|
2259
|
-
x[[1, 4]] = [10, 40]
|
|
2260
|
-
#self.assertTrue(x.mask is not m)
|
|
2261
|
-
self.assertTrue(x[3] is masked)
|
|
2262
|
-
self.assertTrue(x[4] is not masked)
|
|
2263
|
-
assert_equal(x, [0, 10, 2, -1, 40])
|
|
2264
|
-
#
|
|
2265
|
-
x = masked_array(arange(10), mask=[1, 0, 0, 0, 0] * 2)
|
|
2266
|
-
i = [0, 2, 4, 6]
|
|
2267
|
-
x.put(i, [6, 4, 2, 0])
|
|
2268
|
-
assert_equal(x, asarray([6, 1, 4, 3, 2, 5, 0, 7, 8, 9, ]))
|
|
2269
|
-
assert_equal(x.mask, [0, 0, 0, 0, 0, 1, 0, 0, 0, 0])
|
|
2270
|
-
x.put(i, masked_array([0, 2, 4, 6], [1, 0, 1, 0]))
|
|
2271
|
-
assert_array_equal(x, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ])
|
|
2272
|
-
assert_equal(x.mask, [1, 0, 0, 0, 1, 1, 0, 0, 0, 0])
|
|
2273
|
-
#
|
|
2274
|
-
x = masked_array(arange(10), mask=[1, 0, 0, 0, 0] * 2)
|
|
2275
|
-
put(x, i, [6, 4, 2, 0])
|
|
2276
|
-
assert_equal(x, asarray([6, 1, 4, 3, 2, 5, 0, 7, 8, 9, ]))
|
|
2277
|
-
assert_equal(x.mask, [0, 0, 0, 0, 0, 1, 0, 0, 0, 0])
|
|
2278
|
-
put(x, i, masked_array([0, 2, 4, 6], [1, 0, 1, 0]))
|
|
2279
|
-
assert_array_equal(x, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ])
|
|
2280
|
-
assert_equal(x.mask, [1, 0, 0, 0, 1, 1, 0, 0, 0, 0])
|
|
2281
|
-
|
|
2282
|
-
def test_put_hardmask(self):
|
|
2283
|
-
# Tests put on hardmask
|
|
2284
|
-
d = arange(5)
|
|
2285
|
-
n = [0, 0, 0, 1, 1]
|
|
2286
|
-
m = make_mask(n)
|
|
2287
|
-
xh = array(d + 1, mask=m, hard_mask=True, copy=True)
|
|
2288
|
-
xh.put([4, 2, 0, 1, 3], [1, 2, 3, 4, 5])
|
|
2289
|
-
assert_equal(xh._data, [3, 4, 2, 4, 5])
|
|
2290
|
-
|
|
2291
|
-
def test_putmask(self):
|
|
2292
|
-
x = arange(6) + 1
|
|
2293
|
-
mx = array(x, mask=[0, 0, 0, 1, 1, 1])
|
|
2294
|
-
mask = [0, 0, 1, 0, 0, 1]
|
|
2295
|
-
# w/o mask, w/o masked values
|
|
2296
|
-
xx = x.copy()
|
|
2297
|
-
putmask(xx, mask, 99)
|
|
2298
|
-
assert_equal(xx, [1, 2, 99, 4, 5, 99])
|
|
2299
|
-
# w/ mask, w/o masked values
|
|
2300
|
-
mxx = mx.copy()
|
|
2301
|
-
putmask(mxx, mask, 99)
|
|
2302
|
-
assert_equal(mxx._data, [1, 2, 99, 4, 5, 99])
|
|
2303
|
-
assert_equal(mxx._mask, [0, 0, 0, 1, 1, 0])
|
|
2304
|
-
# w/o mask, w/ masked values
|
|
2305
|
-
values = array([10, 20, 30, 40, 50, 60], mask=[1, 1, 1, 0, 0, 0])
|
|
2306
|
-
xx = x.copy()
|
|
2307
|
-
putmask(xx, mask, values)
|
|
2308
|
-
assert_equal(xx._data, [1, 2, 30, 4, 5, 60])
|
|
2309
|
-
assert_equal(xx._mask, [0, 0, 1, 0, 0, 0])
|
|
2310
|
-
# w/ mask, w/ masked values
|
|
2311
|
-
mxx = mx.copy()
|
|
2312
|
-
putmask(mxx, mask, values)
|
|
2313
|
-
assert_equal(mxx._data, [1, 2, 30, 4, 5, 60])
|
|
2314
|
-
assert_equal(mxx._mask, [0, 0, 1, 1, 1, 0])
|
|
2315
|
-
# w/ mask, w/ masked values + hardmask
|
|
2316
|
-
mxx = mx.copy()
|
|
2317
|
-
mxx.harden_mask()
|
|
2318
|
-
putmask(mxx, mask, values)
|
|
2319
|
-
assert_equal(mxx, [1, 2, 30, 4, 5, 60])
|
|
2320
|
-
|
|
2321
|
-
def test_ravel(self):
|
|
2322
|
-
# Tests ravel
|
|
2323
|
-
a = array([[1, 2, 3, 4, 5]], mask=[[0, 1, 0, 0, 0]])
|
|
2324
|
-
aravel = a.ravel()
|
|
2325
|
-
assert_equal(aravel._mask.shape, aravel.shape)
|
|
2326
|
-
a = array([0, 0], mask=[1, 1])
|
|
2327
|
-
aravel = a.ravel()
|
|
2328
|
-
assert_equal(aravel._mask.shape, a.shape)
|
|
2329
|
-
a = array(np.matrix([1, 2, 3, 4, 5]), mask=[[0, 1, 0, 0, 0]])
|
|
2330
|
-
aravel = a.ravel()
|
|
2331
|
-
assert_equal(aravel.shape, (1, 5))
|
|
2332
|
-
assert_equal(aravel._mask.shape, a.shape)
|
|
2333
|
-
# Checks that small_mask is preserved
|
|
2334
|
-
a = array([1, 2, 3, 4], mask=[0, 0, 0, 0], shrink=False)
|
|
2335
|
-
assert_equal(a.ravel()._mask, [0, 0, 0, 0])
|
|
2336
|
-
# Test that the fill_value is preserved
|
|
2337
|
-
a.fill_value = -99
|
|
2338
|
-
a.shape = (2, 2)
|
|
2339
|
-
ar = a.ravel()
|
|
2340
|
-
assert_equal(ar._mask, [0, 0, 0, 0])
|
|
2341
|
-
assert_equal(ar._data, [1, 2, 3, 4])
|
|
2342
|
-
assert_equal(ar.fill_value, -99)
|
|
2343
|
-
|
|
2344
|
-
def test_reshape(self):
|
|
2345
|
-
# Tests reshape
|
|
2346
|
-
x = arange(4)
|
|
2347
|
-
x[0] = masked
|
|
2348
|
-
y = x.reshape(2, 2)
|
|
2349
|
-
assert_equal(y.shape, (2, 2,))
|
|
2350
|
-
assert_equal(y._mask.shape, (2, 2,))
|
|
2351
|
-
assert_equal(x.shape, (4,))
|
|
2352
|
-
assert_equal(x._mask.shape, (4,))
|
|
2353
|
-
|
|
2354
|
-
def test_sort(self):
|
|
2355
|
-
# Test sort
|
|
2356
|
-
x = array([1, 4, 2, 3], mask=[0, 1, 0, 0], dtype=np.uint8)
|
|
2357
|
-
#
|
|
2358
|
-
sortedx = sort(x)
|
|
2359
|
-
assert_equal(sortedx._data, [1, 2, 3, 4])
|
|
2360
|
-
assert_equal(sortedx._mask, [0, 0, 0, 1])
|
|
2361
|
-
#
|
|
2362
|
-
sortedx = sort(x, endwith=False)
|
|
2363
|
-
assert_equal(sortedx._data, [4, 1, 2, 3])
|
|
2364
|
-
assert_equal(sortedx._mask, [1, 0, 0, 0])
|
|
2365
|
-
#
|
|
2366
|
-
x.sort()
|
|
2367
|
-
assert_equal(x._data, [1, 2, 3, 4])
|
|
2368
|
-
assert_equal(x._mask, [0, 0, 0, 1])
|
|
2369
|
-
#
|
|
2370
|
-
x = array([1, 4, 2, 3], mask=[0, 1, 0, 0], dtype=np.uint8)
|
|
2371
|
-
x.sort(endwith=False)
|
|
2372
|
-
assert_equal(x._data, [4, 1, 2, 3])
|
|
2373
|
-
assert_equal(x._mask, [1, 0, 0, 0])
|
|
2374
|
-
#
|
|
2375
|
-
x = [1, 4, 2, 3]
|
|
2376
|
-
sortedx = sort(x)
|
|
2377
|
-
self.assertTrue(not isinstance(sorted, MaskedArray))
|
|
2378
|
-
#
|
|
2379
|
-
x = array([0, 1, -1, -2, 2], mask=nomask, dtype=np.int8)
|
|
2380
|
-
sortedx = sort(x, endwith=False)
|
|
2381
|
-
assert_equal(sortedx._data, [-2, -1, 0, 1, 2])
|
|
2382
|
-
x = array([0, 1, -1, -2, 2], mask=[0, 1, 0, 0, 1], dtype=np.int8)
|
|
2383
|
-
sortedx = sort(x, endwith=False)
|
|
2384
|
-
assert_equal(sortedx._data, [1, 2, -2, -1, 0])
|
|
2385
|
-
assert_equal(sortedx._mask, [1, 1, 0, 0, 0])
|
|
2386
|
-
|
|
2387
|
-
def test_sort_2d(self):
|
|
2388
|
-
# Check sort of 2D array.
|
|
2389
|
-
# 2D array w/o mask
|
|
2390
|
-
a = masked_array([[8, 4, 1], [2, 0, 9]])
|
|
2391
|
-
a.sort(0)
|
|
2392
|
-
assert_equal(a, [[2, 0, 1], [8, 4, 9]])
|
|
2393
|
-
a = masked_array([[8, 4, 1], [2, 0, 9]])
|
|
2394
|
-
a.sort(1)
|
|
2395
|
-
assert_equal(a, [[1, 4, 8], [0, 2, 9]])
|
|
2396
|
-
# 2D array w/mask
|
|
2397
|
-
a = masked_array([[8, 4, 1], [2, 0, 9]], mask=[[1, 0, 0], [0, 0, 1]])
|
|
2398
|
-
a.sort(0)
|
|
2399
|
-
assert_equal(a, [[2, 0, 1], [8, 4, 9]])
|
|
2400
|
-
assert_equal(a._mask, [[0, 0, 0], [1, 0, 1]])
|
|
2401
|
-
a = masked_array([[8, 4, 1], [2, 0, 9]], mask=[[1, 0, 0], [0, 0, 1]])
|
|
2402
|
-
a.sort(1)
|
|
2403
|
-
assert_equal(a, [[1, 4, 8], [0, 2, 9]])
|
|
2404
|
-
assert_equal(a._mask, [[0, 0, 1], [0, 0, 1]])
|
|
2405
|
-
# 3D
|
|
2406
|
-
a = masked_array([[[7, 8, 9], [4, 5, 6], [1, 2, 3]],
|
|
2407
|
-
[[1, 2, 3], [7, 8, 9], [4, 5, 6]],
|
|
2408
|
-
[[7, 8, 9], [1, 2, 3], [4, 5, 6]],
|
|
2409
|
-
[[4, 5, 6], [1, 2, 3], [7, 8, 9]]])
|
|
2410
|
-
a[a % 4 == 0] = masked
|
|
2411
|
-
am = a.copy()
|
|
2412
|
-
an = a.filled(99)
|
|
2413
|
-
am.sort(0)
|
|
2414
|
-
an.sort(0)
|
|
2415
|
-
assert_equal(am, an)
|
|
2416
|
-
am = a.copy()
|
|
2417
|
-
an = a.filled(99)
|
|
2418
|
-
am.sort(1)
|
|
2419
|
-
an.sort(1)
|
|
2420
|
-
assert_equal(am, an)
|
|
2421
|
-
am = a.copy()
|
|
2422
|
-
an = a.filled(99)
|
|
2423
|
-
am.sort(2)
|
|
2424
|
-
an.sort(2)
|
|
2425
|
-
assert_equal(am, an)
|
|
2426
|
-
|
|
2427
|
-
def test_sort_flexible(self):
|
|
2428
|
-
# Test sort on flexible dtype.
|
|
2429
|
-
a = array(
|
|
2430
|
-
data=[(3, 3), (3, 2), (2, 2), (2, 1), (1, 0), (1, 1), (1, 2)],
|
|
2431
|
-
mask=[(0, 0), (0, 1), (0, 0), (0, 0), (1, 0), (0, 0), (0, 0)],
|
|
2432
|
-
dtype=[('A', int), ('B', int)])
|
|
2433
|
-
#
|
|
2434
|
-
test = sort(a)
|
|
2435
|
-
b = array(
|
|
2436
|
-
data=[(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (3, 2), (1, 0)],
|
|
2437
|
-
mask=[(0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 1), (1, 0)],
|
|
2438
|
-
dtype=[('A', int), ('B', int)])
|
|
2439
|
-
assert_equal(test, b)
|
|
2440
|
-
assert_equal(test.mask, b.mask)
|
|
2441
|
-
#
|
|
2442
|
-
test = sort(a, endwith=False)
|
|
2443
|
-
b = array(
|
|
2444
|
-
data=[(1, 0), (1, 1), (1, 2), (2, 1), (2, 2), (3, 2), (3, 3), ],
|
|
2445
|
-
mask=[(1, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 1), (0, 0), ],
|
|
2446
|
-
dtype=[('A', int), ('B', int)])
|
|
2447
|
-
assert_equal(test, b)
|
|
2448
|
-
assert_equal(test.mask, b.mask)
|
|
2449
|
-
|
|
2450
|
-
def test_argsort(self):
|
|
2451
|
-
# Test argsort
|
|
2452
|
-
a = array([1, 5, 2, 4, 3], mask=[1, 0, 0, 1, 0])
|
|
2453
|
-
assert_equal(np.argsort(a), argsort(a))
|
|
2454
|
-
|
|
2455
|
-
def test_squeeze(self):
|
|
2456
|
-
# Check squeeze
|
|
2457
|
-
data = masked_array([[1, 2, 3]])
|
|
2458
|
-
assert_equal(data.squeeze(), [1, 2, 3])
|
|
2459
|
-
data = masked_array([[1, 2, 3]], mask=[[1, 1, 1]])
|
|
2460
|
-
assert_equal(data.squeeze(), [1, 2, 3])
|
|
2461
|
-
assert_equal(data.squeeze()._mask, [1, 1, 1])
|
|
2462
|
-
data = masked_array([[1]], mask=True)
|
|
2463
|
-
self.assertTrue(data.squeeze() is masked)
|
|
2464
|
-
|
|
2465
|
-
def test_swapaxes(self):
|
|
2466
|
-
# Tests swapaxes on MaskedArrays.
|
|
2467
|
-
x = np.array([8.375, 7.545, 8.828, 8.5, 1.757, 5.928,
|
|
2468
|
-
8.43, 7.78, 9.865, 5.878, 8.979, 4.732,
|
|
2469
|
-
3.012, 6.022, 5.095, 3.116, 5.238, 3.957,
|
|
2470
|
-
6.04, 9.63, 7.712, 3.382, 4.489, 6.479,
|
|
2471
|
-
7.189, 9.645, 5.395, 4.961, 9.894, 2.893,
|
|
2472
|
-
7.357, 9.828, 6.272, 3.758, 6.693, 0.993])
|
|
2473
|
-
m = np.array([0, 1, 0, 1, 0, 0,
|
|
2474
|
-
1, 0, 1, 1, 0, 1,
|
|
2475
|
-
0, 0, 0, 1, 0, 1,
|
|
2476
|
-
0, 0, 0, 1, 1, 1,
|
|
2477
|
-
1, 0, 0, 1, 0, 0,
|
|
2478
|
-
0, 0, 1, 0, 1, 0])
|
|
2479
|
-
mX = array(x, mask=m).reshape(6, 6)
|
|
2480
|
-
mXX = mX.reshape(3, 2, 2, 3)
|
|
2481
|
-
#
|
|
2482
|
-
mXswapped = mX.swapaxes(0, 1)
|
|
2483
|
-
assert_equal(mXswapped[-1], mX[:, -1])
|
|
2484
|
-
|
|
2485
|
-
mXXswapped = mXX.swapaxes(0, 2)
|
|
2486
|
-
assert_equal(mXXswapped.shape, (2, 2, 3, 3))
|
|
2487
|
-
|
|
2488
|
-
def test_take(self):
|
|
2489
|
-
# Tests take
|
|
2490
|
-
x = masked_array([10, 20, 30, 40], [0, 1, 0, 1])
|
|
2491
|
-
assert_equal(x.take([0, 0, 3]), masked_array([10, 10, 40], [0, 0, 1]))
|
|
2492
|
-
assert_equal(x.take([0, 0, 3]), x[[0, 0, 3]])
|
|
2493
|
-
assert_equal(x.take([[0, 1], [0, 1]]),
|
|
2494
|
-
masked_array([[10, 20], [10, 20]], [[0, 1], [0, 1]]))
|
|
2495
|
-
#
|
|
2496
|
-
x = array([[10, 20, 30], [40, 50, 60]], mask=[[0, 0, 1], [1, 0, 0, ]])
|
|
2497
|
-
assert_equal(x.take([0, 2], axis=1),
|
|
2498
|
-
array([[10, 30], [40, 60]], mask=[[0, 1], [1, 0]]))
|
|
2499
|
-
assert_equal(take(x, [0, 2], axis=1),
|
|
2500
|
-
array([[10, 30], [40, 60]], mask=[[0, 1], [1, 0]]))
|
|
2501
|
-
|
|
2502
|
-
def test_take_masked_indices(self):
|
|
2503
|
-
# Test take w/ masked indices
|
|
2504
|
-
a = np.array((40, 18, 37, 9, 22))
|
|
2505
|
-
indices = np.arange(3)[None,:] + np.arange(5)[:, None]
|
|
2506
|
-
mindices = array(indices, mask=(indices >= len(a)))
|
|
2507
|
-
# No mask
|
|
2508
|
-
test = take(a, mindices, mode='clip')
|
|
2509
|
-
ctrl = array([[40, 18, 37],
|
|
2510
|
-
[18, 37, 9],
|
|
2511
|
-
[37, 9, 22],
|
|
2512
|
-
[9, 22, 22],
|
|
2513
|
-
[22, 22, 22]])
|
|
2514
|
-
assert_equal(test, ctrl)
|
|
2515
|
-
# Masked indices
|
|
2516
|
-
test = take(a, mindices)
|
|
2517
|
-
ctrl = array([[40, 18, 37],
|
|
2518
|
-
[18, 37, 9],
|
|
2519
|
-
[37, 9, 22],
|
|
2520
|
-
[9, 22, 40],
|
|
2521
|
-
[22, 40, 40]])
|
|
2522
|
-
ctrl[3, 2] = ctrl[4, 1] = ctrl[4, 2] = masked
|
|
2523
|
-
assert_equal(test, ctrl)
|
|
2524
|
-
assert_equal(test.mask, ctrl.mask)
|
|
2525
|
-
# Masked input + masked indices
|
|
2526
|
-
a = array((40, 18, 37, 9, 22), mask=(0, 1, 0, 0, 0))
|
|
2527
|
-
test = take(a, mindices)
|
|
2528
|
-
ctrl[0, 1] = ctrl[1, 0] = masked
|
|
2529
|
-
assert_equal(test, ctrl)
|
|
2530
|
-
assert_equal(test.mask, ctrl.mask)
|
|
2531
|
-
|
|
2532
|
-
def test_tolist(self):
|
|
2533
|
-
# Tests to list
|
|
2534
|
-
# ... on 1D
|
|
2535
|
-
x = array(np.arange(12))
|
|
2536
|
-
x[[1, -2]] = masked
|
|
2537
|
-
xlist = x.tolist()
|
|
2538
|
-
self.assertTrue(xlist[1] is None)
|
|
2539
|
-
self.assertTrue(xlist[-2] is None)
|
|
2540
|
-
# ... on 2D
|
|
2541
|
-
x.shape = (3, 4)
|
|
2542
|
-
xlist = x.tolist()
|
|
2543
|
-
ctrl = [[0, None, 2, 3], [4, 5, 6, 7], [8, 9, None, 11]]
|
|
2544
|
-
assert_equal(xlist[0], [0, None, 2, 3])
|
|
2545
|
-
assert_equal(xlist[1], [4, 5, 6, 7])
|
|
2546
|
-
assert_equal(xlist[2], [8, 9, None, 11])
|
|
2547
|
-
assert_equal(xlist, ctrl)
|
|
2548
|
-
# ... on structured array w/ masked records
|
|
2549
|
-
x = array(list(zip([1, 2, 3],
|
|
2550
|
-
[1.1, 2.2, 3.3],
|
|
2551
|
-
['one', 'two', 'thr'])),
|
|
2552
|
-
dtype=[('a', int), ('b', float), ('c', '|S8')])
|
|
2553
|
-
x[-1] = masked
|
|
2554
|
-
assert_equal(x.tolist(),
|
|
2555
|
-
[(1, 1.1, asbytes('one')),
|
|
2556
|
-
(2, 2.2, asbytes('two')),
|
|
2557
|
-
(None, None, None)])
|
|
2558
|
-
# ... on structured array w/ masked fields
|
|
2559
|
-
a = array([(1, 2,), (3, 4)], mask=[(0, 1), (0, 0)],
|
|
2560
|
-
dtype=[('a', int), ('b', int)])
|
|
2561
|
-
test = a.tolist()
|
|
2562
|
-
assert_equal(test, [[1, None], [3, 4]])
|
|
2563
|
-
# ... on mvoid
|
|
2564
|
-
a = a[0]
|
|
2565
|
-
test = a.tolist()
|
|
2566
|
-
assert_equal(test, [1, None])
|
|
2567
|
-
|
|
2568
|
-
def test_tolist_specialcase(self):
|
|
2569
|
-
# Test mvoid.tolist: make sure we return a standard Python object
|
|
2570
|
-
a = array([(0, 1), (2, 3)], dtype=[('a', int), ('b', int)])
|
|
2571
|
-
# w/o mask: each entry is a np.void whose elements are standard Python
|
|
2572
|
-
for entry in a:
|
|
2573
|
-
for item in entry.tolist():
|
|
2574
|
-
assert_(not isinstance(item, np.generic))
|
|
2575
|
-
# w/ mask: each entry is a ma.void whose elements should be
|
|
2576
|
-
# standard Python
|
|
2577
|
-
a.mask[0] = (0, 1)
|
|
2578
|
-
for entry in a:
|
|
2579
|
-
for item in entry.tolist():
|
|
2580
|
-
assert_(not isinstance(item, np.generic))
|
|
2581
|
-
|
|
2582
|
-
def test_toflex(self):
|
|
2583
|
-
# Test the conversion to records
|
|
2584
|
-
data = arange(10)
|
|
2585
|
-
record = data.toflex()
|
|
2586
|
-
assert_equal(record['_data'], data._data)
|
|
2587
|
-
assert_equal(record['_mask'], data._mask)
|
|
2588
|
-
#
|
|
2589
|
-
data[[0, 1, 2, -1]] = masked
|
|
2590
|
-
record = data.toflex()
|
|
2591
|
-
assert_equal(record['_data'], data._data)
|
|
2592
|
-
assert_equal(record['_mask'], data._mask)
|
|
2593
|
-
#
|
|
2594
|
-
ndtype = [('i', int), ('s', '|S3'), ('f', float)]
|
|
2595
|
-
data = array([(i, s, f) for (i, s, f) in zip(np.arange(10),
|
|
2596
|
-
'ABCDEFGHIJKLM',
|
|
2597
|
-
np.random.rand(10))],
|
|
2598
|
-
dtype=ndtype)
|
|
2599
|
-
data[[0, 1, 2, -1]] = masked
|
|
2600
|
-
record = data.toflex()
|
|
2601
|
-
assert_equal(record['_data'], data._data)
|
|
2602
|
-
assert_equal(record['_mask'], data._mask)
|
|
2603
|
-
#
|
|
2604
|
-
ndtype = np.dtype("int, (2,3)float, float")
|
|
2605
|
-
data = array([(i, f, ff) for (i, f, ff) in zip(np.arange(10),
|
|
2606
|
-
np.random.rand(10),
|
|
2607
|
-
np.random.rand(10))],
|
|
2608
|
-
dtype=ndtype)
|
|
2609
|
-
data[[0, 1, 2, -1]] = masked
|
|
2610
|
-
record = data.toflex()
|
|
2611
|
-
assert_equal_records(record['_data'], data._data)
|
|
2612
|
-
assert_equal_records(record['_mask'], data._mask)
|
|
2613
|
-
|
|
2614
|
-
def test_fromflex(self):
|
|
2615
|
-
# Test the reconstruction of a masked_array from a record
|
|
2616
|
-
a = array([1, 2, 3])
|
|
2617
|
-
test = fromflex(a.toflex())
|
|
2618
|
-
assert_equal(test, a)
|
|
2619
|
-
assert_equal(test.mask, a.mask)
|
|
2620
|
-
#
|
|
2621
|
-
a = array([1, 2, 3], mask=[0, 0, 1])
|
|
2622
|
-
test = fromflex(a.toflex())
|
|
2623
|
-
assert_equal(test, a)
|
|
2624
|
-
assert_equal(test.mask, a.mask)
|
|
2625
|
-
#
|
|
2626
|
-
a = array([(1, 1.), (2, 2.), (3, 3.)], mask=[(1, 0), (0, 0), (0, 1)],
|
|
2627
|
-
dtype=[('A', int), ('B', float)])
|
|
2628
|
-
test = fromflex(a.toflex())
|
|
2629
|
-
assert_equal(test, a)
|
|
2630
|
-
assert_equal(test.data, a.data)
|
|
2631
|
-
|
|
2632
|
-
def test_arraymethod(self):
|
|
2633
|
-
# Test a _arraymethod w/ n argument
|
|
2634
|
-
marray = masked_array([[1, 2, 3, 4, 5]], mask=[0, 0, 1, 0, 0])
|
|
2635
|
-
control = masked_array([[1], [2], [3], [4], [5]],
|
|
2636
|
-
mask=[0, 0, 1, 0, 0])
|
|
2637
|
-
assert_equal(marray.T, control)
|
|
2638
|
-
assert_equal(marray.transpose(), control)
|
|
2639
|
-
#
|
|
2640
|
-
assert_equal(MaskedArray.cumsum(marray.T, 0), control.cumsum(0))
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
#------------------------------------------------------------------------------
|
|
2644
|
-
class TestMaskedArrayMathMethods(TestCase):
|
|
2645
|
-
|
|
2646
|
-
def setUp(self):
|
|
2647
|
-
# Base data definition.
|
|
2648
|
-
x = np.array([8.375, 7.545, 8.828, 8.5, 1.757, 5.928,
|
|
2649
|
-
8.43, 7.78, 9.865, 5.878, 8.979, 4.732,
|
|
2650
|
-
3.012, 6.022, 5.095, 3.116, 5.238, 3.957,
|
|
2651
|
-
6.04, 9.63, 7.712, 3.382, 4.489, 6.479,
|
|
2652
|
-
7.189, 9.645, 5.395, 4.961, 9.894, 2.893,
|
|
2653
|
-
7.357, 9.828, 6.272, 3.758, 6.693, 0.993])
|
|
2654
|
-
X = x.reshape(6, 6)
|
|
2655
|
-
XX = x.reshape(3, 2, 2, 3)
|
|
2656
|
-
|
|
2657
|
-
m = np.array([0, 1, 0, 1, 0, 0,
|
|
2658
|
-
1, 0, 1, 1, 0, 1,
|
|
2659
|
-
0, 0, 0, 1, 0, 1,
|
|
2660
|
-
0, 0, 0, 1, 1, 1,
|
|
2661
|
-
1, 0, 0, 1, 0, 0,
|
|
2662
|
-
0, 0, 1, 0, 1, 0])
|
|
2663
|
-
mx = array(data=x, mask=m)
|
|
2664
|
-
mX = array(data=X, mask=m.reshape(X.shape))
|
|
2665
|
-
mXX = array(data=XX, mask=m.reshape(XX.shape))
|
|
2666
|
-
|
|
2667
|
-
m2 = np.array([1, 1, 0, 1, 0, 0,
|
|
2668
|
-
1, 1, 1, 1, 0, 1,
|
|
2669
|
-
0, 0, 1, 1, 0, 1,
|
|
2670
|
-
0, 0, 0, 1, 1, 1,
|
|
2671
|
-
1, 0, 0, 1, 1, 0,
|
|
2672
|
-
0, 0, 1, 0, 1, 1])
|
|
2673
|
-
m2x = array(data=x, mask=m2)
|
|
2674
|
-
m2X = array(data=X, mask=m2.reshape(X.shape))
|
|
2675
|
-
m2XX = array(data=XX, mask=m2.reshape(XX.shape))
|
|
2676
|
-
self.d = (x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX)
|
|
2677
|
-
|
|
2678
|
-
def test_cumsumprod(self):
|
|
2679
|
-
# Tests cumsum & cumprod on MaskedArrays.
|
|
2680
|
-
(x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX) = self.d
|
|
2681
|
-
mXcp = mX.cumsum(0)
|
|
2682
|
-
assert_equal(mXcp._data, mX.filled(0).cumsum(0))
|
|
2683
|
-
mXcp = mX.cumsum(1)
|
|
2684
|
-
assert_equal(mXcp._data, mX.filled(0).cumsum(1))
|
|
2685
|
-
#
|
|
2686
|
-
mXcp = mX.cumprod(0)
|
|
2687
|
-
assert_equal(mXcp._data, mX.filled(1).cumprod(0))
|
|
2688
|
-
mXcp = mX.cumprod(1)
|
|
2689
|
-
assert_equal(mXcp._data, mX.filled(1).cumprod(1))
|
|
2690
|
-
|
|
2691
|
-
def test_cumsumprod_with_output(self):
|
|
2692
|
-
# Tests cumsum/cumprod w/ output
|
|
2693
|
-
xm = array(np.random.uniform(0, 10, 12)).reshape(3, 4)
|
|
2694
|
-
xm[:, 0] = xm[0] = xm[-1, -1] = masked
|
|
2695
|
-
#
|
|
2696
|
-
for funcname in ('cumsum', 'cumprod'):
|
|
2697
|
-
npfunc = getattr(np, funcname)
|
|
2698
|
-
xmmeth = getattr(xm, funcname)
|
|
2699
|
-
|
|
2700
|
-
# A ndarray as explicit input
|
|
2701
|
-
output = np.empty((3, 4), dtype=float)
|
|
2702
|
-
output.fill(-9999)
|
|
2703
|
-
result = npfunc(xm, axis=0, out=output)
|
|
2704
|
-
# ... the result should be the given output
|
|
2705
|
-
self.assertTrue(result is output)
|
|
2706
|
-
assert_equal(result, xmmeth(axis=0, out=output))
|
|
2707
|
-
#
|
|
2708
|
-
output = empty((3, 4), dtype=int)
|
|
2709
|
-
result = xmmeth(axis=0, out=output)
|
|
2710
|
-
self.assertTrue(result is output)
|
|
2711
|
-
|
|
2712
|
-
def test_ptp(self):
|
|
2713
|
-
# Tests ptp on MaskedArrays.
|
|
2714
|
-
(x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX) = self.d
|
|
2715
|
-
(n, m) = X.shape
|
|
2716
|
-
assert_equal(mx.ptp(), mx.compressed().ptp())
|
|
2717
|
-
rows = np.zeros(n, np.float)
|
|
2718
|
-
cols = np.zeros(m, np.float)
|
|
2719
|
-
for k in range(m):
|
|
2720
|
-
cols[k] = mX[:, k].compressed().ptp()
|
|
2721
|
-
for k in range(n):
|
|
2722
|
-
rows[k] = mX[k].compressed().ptp()
|
|
2723
|
-
assert_equal(mX.ptp(0), cols)
|
|
2724
|
-
assert_equal(mX.ptp(1), rows)
|
|
2725
|
-
|
|
2726
|
-
def test_sum_object(self):
|
|
2727
|
-
# Test sum on object dtype
|
|
2728
|
-
a = masked_array([1, 2, 3], mask=[1, 0, 0], dtype=np.object)
|
|
2729
|
-
assert_equal(a.sum(), 5)
|
|
2730
|
-
a = masked_array([[1, 2, 3], [4, 5, 6]], dtype=object)
|
|
2731
|
-
assert_equal(a.sum(axis=0), [5, 7, 9])
|
|
2732
|
-
|
|
2733
|
-
def test_prod_object(self):
|
|
2734
|
-
# Test prod on object dtype
|
|
2735
|
-
a = masked_array([1, 2, 3], mask=[1, 0, 0], dtype=np.object)
|
|
2736
|
-
assert_equal(a.prod(), 2 * 3)
|
|
2737
|
-
a = masked_array([[1, 2, 3], [4, 5, 6]], dtype=object)
|
|
2738
|
-
assert_equal(a.prod(axis=0), [4, 10, 18])
|
|
2739
|
-
|
|
2740
|
-
def test_meananom_object(self):
|
|
2741
|
-
# Test mean/anom on object dtype
|
|
2742
|
-
a = masked_array([1, 2, 3], dtype=np.object)
|
|
2743
|
-
assert_equal(a.mean(), 2)
|
|
2744
|
-
assert_equal(a.anom(), [-1, 0, 1])
|
|
2745
|
-
|
|
2746
|
-
def test_trace(self):
|
|
2747
|
-
# Tests trace on MaskedArrays.
|
|
2748
|
-
(x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX) = self.d
|
|
2749
|
-
mXdiag = mX.diagonal()
|
|
2750
|
-
assert_equal(mX.trace(), mX.diagonal().compressed().sum())
|
|
2751
|
-
assert_almost_equal(mX.trace(),
|
|
2752
|
-
X.trace() - sum(mXdiag.mask * X.diagonal(),
|
|
2753
|
-
axis=0))
|
|
2754
|
-
|
|
2755
|
-
def test_varstd(self):
|
|
2756
|
-
# Tests var & std on MaskedArrays.
|
|
2757
|
-
(x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX) = self.d
|
|
2758
|
-
assert_almost_equal(mX.var(axis=None), mX.compressed().var())
|
|
2759
|
-
assert_almost_equal(mX.std(axis=None), mX.compressed().std())
|
|
2760
|
-
assert_almost_equal(mX.std(axis=None, ddof=1),
|
|
2761
|
-
mX.compressed().std(ddof=1))
|
|
2762
|
-
assert_almost_equal(mX.var(axis=None, ddof=1),
|
|
2763
|
-
mX.compressed().var(ddof=1))
|
|
2764
|
-
assert_equal(mXX.var(axis=3).shape, XX.var(axis=3).shape)
|
|
2765
|
-
assert_equal(mX.var().shape, X.var().shape)
|
|
2766
|
-
(mXvar0, mXvar1) = (mX.var(axis=0), mX.var(axis=1))
|
|
2767
|
-
assert_almost_equal(mX.var(axis=None, ddof=2),
|
|
2768
|
-
mX.compressed().var(ddof=2))
|
|
2769
|
-
assert_almost_equal(mX.std(axis=None, ddof=2),
|
|
2770
|
-
mX.compressed().std(ddof=2))
|
|
2771
|
-
for k in range(6):
|
|
2772
|
-
assert_almost_equal(mXvar1[k], mX[k].compressed().var())
|
|
2773
|
-
assert_almost_equal(mXvar0[k], mX[:, k].compressed().var())
|
|
2774
|
-
assert_almost_equal(np.sqrt(mXvar0[k]),
|
|
2775
|
-
mX[:, k].compressed().std())
|
|
2776
|
-
|
|
2777
|
-
def test_varstd_specialcases(self):
|
|
2778
|
-
# Test a special case for var
|
|
2779
|
-
nout = np.array(-1, dtype=float)
|
|
2780
|
-
mout = array(-1, dtype=float)
|
|
2781
|
-
#
|
|
2782
|
-
x = array(arange(10), mask=True)
|
|
2783
|
-
for methodname in ('var', 'std'):
|
|
2784
|
-
method = getattr(x, methodname)
|
|
2785
|
-
self.assertTrue(method() is masked)
|
|
2786
|
-
self.assertTrue(method(0) is masked)
|
|
2787
|
-
self.assertTrue(method(-1) is masked)
|
|
2788
|
-
# Using a masked array as explicit output
|
|
2789
|
-
with warnings.catch_warnings():
|
|
2790
|
-
warnings.simplefilter('ignore')
|
|
2791
|
-
_ = method(out=mout)
|
|
2792
|
-
self.assertTrue(mout is not masked)
|
|
2793
|
-
assert_equal(mout.mask, True)
|
|
2794
|
-
# Using a ndarray as explicit output
|
|
2795
|
-
with warnings.catch_warnings():
|
|
2796
|
-
warnings.simplefilter('ignore')
|
|
2797
|
-
_ = method(out=nout)
|
|
2798
|
-
self.assertTrue(np.isnan(nout))
|
|
2799
|
-
#
|
|
2800
|
-
x = array(arange(10), mask=True)
|
|
2801
|
-
x[-1] = 9
|
|
2802
|
-
for methodname in ('var', 'std'):
|
|
2803
|
-
method = getattr(x, methodname)
|
|
2804
|
-
self.assertTrue(method(ddof=1) is masked)
|
|
2805
|
-
self.assertTrue(method(0, ddof=1) is masked)
|
|
2806
|
-
self.assertTrue(method(-1, ddof=1) is masked)
|
|
2807
|
-
# Using a masked array as explicit output
|
|
2808
|
-
method(out=mout, ddof=1)
|
|
2809
|
-
self.assertTrue(mout is not masked)
|
|
2810
|
-
assert_equal(mout.mask, True)
|
|
2811
|
-
# Using a ndarray as explicit output
|
|
2812
|
-
method(out=nout, ddof=1)
|
|
2813
|
-
self.assertTrue(np.isnan(nout))
|
|
2814
|
-
|
|
2815
|
-
def test_varstd_ddof(self):
|
|
2816
|
-
a = array([[1, 1, 0], [1, 1, 0]], mask=[[0, 0, 1], [0, 0, 1]])
|
|
2817
|
-
test = a.std(axis=0, ddof=0)
|
|
2818
|
-
assert_equal(test.filled(0), [0, 0, 0])
|
|
2819
|
-
assert_equal(test.mask, [0, 0, 1])
|
|
2820
|
-
test = a.std(axis=0, ddof=1)
|
|
2821
|
-
assert_equal(test.filled(0), [0, 0, 0])
|
|
2822
|
-
assert_equal(test.mask, [0, 0, 1])
|
|
2823
|
-
test = a.std(axis=0, ddof=2)
|
|
2824
|
-
assert_equal(test.filled(0), [0, 0, 0])
|
|
2825
|
-
assert_equal(test.mask, [1, 1, 1])
|
|
2826
|
-
|
|
2827
|
-
def test_diag(self):
|
|
2828
|
-
# Test diag
|
|
2829
|
-
x = arange(9).reshape((3, 3))
|
|
2830
|
-
x[1, 1] = masked
|
|
2831
|
-
out = np.diag(x)
|
|
2832
|
-
assert_equal(out, [0, 4, 8])
|
|
2833
|
-
out = diag(x)
|
|
2834
|
-
assert_equal(out, [0, 4, 8])
|
|
2835
|
-
assert_equal(out.mask, [0, 1, 0])
|
|
2836
|
-
out = diag(out)
|
|
2837
|
-
control = array([[0, 0, 0], [0, 4, 0], [0, 0, 8]],
|
|
2838
|
-
mask=[[0, 0, 0], [0, 1, 0], [0, 0, 0]])
|
|
2839
|
-
assert_equal(out, control)
|
|
2840
|
-
|
|
2841
|
-
def test_axis_methods_nomask(self):
|
|
2842
|
-
# Test the combination nomask & methods w/ axis
|
|
2843
|
-
a = array([[1, 2, 3], [4, 5, 6]])
|
|
2844
|
-
#
|
|
2845
|
-
assert_equal(a.sum(0), [5, 7, 9])
|
|
2846
|
-
assert_equal(a.sum(-1), [6, 15])
|
|
2847
|
-
assert_equal(a.sum(1), [6, 15])
|
|
2848
|
-
#
|
|
2849
|
-
assert_equal(a.prod(0), [4, 10, 18])
|
|
2850
|
-
assert_equal(a.prod(-1), [6, 120])
|
|
2851
|
-
assert_equal(a.prod(1), [6, 120])
|
|
2852
|
-
#
|
|
2853
|
-
assert_equal(a.min(0), [1, 2, 3])
|
|
2854
|
-
assert_equal(a.min(-1), [1, 4])
|
|
2855
|
-
assert_equal(a.min(1), [1, 4])
|
|
2856
|
-
#
|
|
2857
|
-
assert_equal(a.max(0), [4, 5, 6])
|
|
2858
|
-
assert_equal(a.max(-1), [3, 6])
|
|
2859
|
-
assert_equal(a.max(1), [3, 6])
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
#------------------------------------------------------------------------------
|
|
2863
|
-
class TestMaskedArrayMathMethodsComplex(TestCase):
|
|
2864
|
-
# Test class for miscellaneous MaskedArrays methods.
|
|
2865
|
-
def setUp(self):
|
|
2866
|
-
# Base data definition.
|
|
2867
|
-
x = np.array([8.375j, 7.545j, 8.828j, 8.5j, 1.757j, 5.928,
|
|
2868
|
-
8.43, 7.78, 9.865, 5.878, 8.979, 4.732,
|
|
2869
|
-
3.012, 6.022, 5.095, 3.116, 5.238, 3.957,
|
|
2870
|
-
6.04, 9.63, 7.712, 3.382, 4.489, 6.479j,
|
|
2871
|
-
7.189j, 9.645, 5.395, 4.961, 9.894, 2.893,
|
|
2872
|
-
7.357, 9.828, 6.272, 3.758, 6.693, 0.993j])
|
|
2873
|
-
X = x.reshape(6, 6)
|
|
2874
|
-
XX = x.reshape(3, 2, 2, 3)
|
|
2875
|
-
|
|
2876
|
-
m = np.array([0, 1, 0, 1, 0, 0,
|
|
2877
|
-
1, 0, 1, 1, 0, 1,
|
|
2878
|
-
0, 0, 0, 1, 0, 1,
|
|
2879
|
-
0, 0, 0, 1, 1, 1,
|
|
2880
|
-
1, 0, 0, 1, 0, 0,
|
|
2881
|
-
0, 0, 1, 0, 1, 0])
|
|
2882
|
-
mx = array(data=x, mask=m)
|
|
2883
|
-
mX = array(data=X, mask=m.reshape(X.shape))
|
|
2884
|
-
mXX = array(data=XX, mask=m.reshape(XX.shape))
|
|
2885
|
-
|
|
2886
|
-
m2 = np.array([1, 1, 0, 1, 0, 0,
|
|
2887
|
-
1, 1, 1, 1, 0, 1,
|
|
2888
|
-
0, 0, 1, 1, 0, 1,
|
|
2889
|
-
0, 0, 0, 1, 1, 1,
|
|
2890
|
-
1, 0, 0, 1, 1, 0,
|
|
2891
|
-
0, 0, 1, 0, 1, 1])
|
|
2892
|
-
m2x = array(data=x, mask=m2)
|
|
2893
|
-
m2X = array(data=X, mask=m2.reshape(X.shape))
|
|
2894
|
-
m2XX = array(data=XX, mask=m2.reshape(XX.shape))
|
|
2895
|
-
self.d = (x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX)
|
|
2896
|
-
|
|
2897
|
-
def test_varstd(self):
|
|
2898
|
-
# Tests var & std on MaskedArrays.
|
|
2899
|
-
(x, X, XX, m, mx, mX, mXX, m2x, m2X, m2XX) = self.d
|
|
2900
|
-
assert_almost_equal(mX.var(axis=None), mX.compressed().var())
|
|
2901
|
-
assert_almost_equal(mX.std(axis=None), mX.compressed().std())
|
|
2902
|
-
assert_equal(mXX.var(axis=3).shape, XX.var(axis=3).shape)
|
|
2903
|
-
assert_equal(mX.var().shape, X.var().shape)
|
|
2904
|
-
(mXvar0, mXvar1) = (mX.var(axis=0), mX.var(axis=1))
|
|
2905
|
-
assert_almost_equal(mX.var(axis=None, ddof=2),
|
|
2906
|
-
mX.compressed().var(ddof=2))
|
|
2907
|
-
assert_almost_equal(mX.std(axis=None, ddof=2),
|
|
2908
|
-
mX.compressed().std(ddof=2))
|
|
2909
|
-
for k in range(6):
|
|
2910
|
-
assert_almost_equal(mXvar1[k], mX[k].compressed().var())
|
|
2911
|
-
assert_almost_equal(mXvar0[k], mX[:, k].compressed().var())
|
|
2912
|
-
assert_almost_equal(np.sqrt(mXvar0[k]),
|
|
2913
|
-
mX[:, k].compressed().std())
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
#------------------------------------------------------------------------------
|
|
2917
|
-
class TestMaskedArrayFunctions(TestCase):
|
|
2918
|
-
# Test class for miscellaneous functions.
|
|
2919
|
-
|
|
2920
|
-
def setUp(self):
|
|
2921
|
-
x = np.array([1., 1., 1., -2., pi/2.0, 4., 5., -10., 10., 1., 2., 3.])
|
|
2922
|
-
y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.])
|
|
2923
|
-
m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
|
2924
|
-
m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
|
|
2925
|
-
xm = masked_array(x, mask=m1)
|
|
2926
|
-
ym = masked_array(y, mask=m2)
|
|
2927
|
-
xm.set_fill_value(1e+20)
|
|
2928
|
-
self.info = (xm, ym)
|
|
2929
|
-
|
|
2930
|
-
def test_masked_where_bool(self):
|
|
2931
|
-
x = [1, 2]
|
|
2932
|
-
y = masked_where(False, x)
|
|
2933
|
-
assert_equal(y, [1, 2])
|
|
2934
|
-
assert_equal(y[1], 2)
|
|
2935
|
-
|
|
2936
|
-
def test_masked_equal_wlist(self):
|
|
2937
|
-
x = [1, 2, 3]
|
|
2938
|
-
mx = masked_equal(x, 3)
|
|
2939
|
-
assert_equal(mx, x)
|
|
2940
|
-
assert_equal(mx._mask, [0, 0, 1])
|
|
2941
|
-
mx = masked_not_equal(x, 3)
|
|
2942
|
-
assert_equal(mx, x)
|
|
2943
|
-
assert_equal(mx._mask, [1, 1, 0])
|
|
2944
|
-
|
|
2945
|
-
def test_masked_equal_fill_value(self):
|
|
2946
|
-
x = [1, 2, 3]
|
|
2947
|
-
mx = masked_equal(x, 3)
|
|
2948
|
-
assert_equal(mx._mask, [0, 0, 1])
|
|
2949
|
-
assert_equal(mx.fill_value, 3)
|
|
2950
|
-
|
|
2951
|
-
def test_masked_where_condition(self):
|
|
2952
|
-
# Tests masking functions.
|
|
2953
|
-
x = array([1., 2., 3., 4., 5.])
|
|
2954
|
-
x[2] = masked
|
|
2955
|
-
assert_equal(masked_where(greater(x, 2), x), masked_greater(x, 2))
|
|
2956
|
-
assert_equal(masked_where(greater_equal(x, 2), x),
|
|
2957
|
-
masked_greater_equal(x, 2))
|
|
2958
|
-
assert_equal(masked_where(less(x, 2), x), masked_less(x, 2))
|
|
2959
|
-
assert_equal(masked_where(less_equal(x, 2), x),
|
|
2960
|
-
masked_less_equal(x, 2))
|
|
2961
|
-
assert_equal(masked_where(not_equal(x, 2), x), masked_not_equal(x, 2))
|
|
2962
|
-
assert_equal(masked_where(equal(x, 2), x), masked_equal(x, 2))
|
|
2963
|
-
assert_equal(masked_where(not_equal(x, 2), x), masked_not_equal(x, 2))
|
|
2964
|
-
assert_equal(masked_where([1, 1, 0, 0, 0], [1, 2, 3, 4, 5]),
|
|
2965
|
-
[99, 99, 3, 4, 5])
|
|
2966
|
-
|
|
2967
|
-
def test_masked_where_oddities(self):
|
|
2968
|
-
# Tests some generic features.
|
|
2969
|
-
atest = ones((10, 10, 10), dtype=float)
|
|
2970
|
-
btest = zeros(atest.shape, MaskType)
|
|
2971
|
-
ctest = masked_where(btest, atest)
|
|
2972
|
-
assert_equal(atest, ctest)
|
|
2973
|
-
|
|
2974
|
-
def test_masked_where_shape_constraint(self):
|
|
2975
|
-
a = arange(10)
|
|
2976
|
-
try:
|
|
2977
|
-
test = masked_equal(1, a)
|
|
2978
|
-
except IndexError:
|
|
2979
|
-
pass
|
|
2980
|
-
else:
|
|
2981
|
-
raise AssertionError("Should have failed...")
|
|
2982
|
-
test = masked_equal(a, 1)
|
|
2983
|
-
assert_equal(test.mask, [0, 1, 0, 0, 0, 0, 0, 0, 0, 0])
|
|
2984
|
-
|
|
2985
|
-
def test_masked_otherfunctions(self):
|
|
2986
|
-
assert_equal(masked_inside(list(range(5)), 1, 3),
|
|
2987
|
-
[0, 199, 199, 199, 4])
|
|
2988
|
-
assert_equal(masked_outside(list(range(5)), 1, 3), [199, 1, 2, 3, 199])
|
|
2989
|
-
assert_equal(masked_inside(array(list(range(5)),
|
|
2990
|
-
mask=[1, 0, 0, 0, 0]), 1, 3).mask,
|
|
2991
|
-
[1, 1, 1, 1, 0])
|
|
2992
|
-
assert_equal(masked_outside(array(list(range(5)),
|
|
2993
|
-
mask=[0, 1, 0, 0, 0]), 1, 3).mask,
|
|
2994
|
-
[1, 1, 0, 0, 1])
|
|
2995
|
-
assert_equal(masked_equal(array(list(range(5)),
|
|
2996
|
-
mask=[1, 0, 0, 0, 0]), 2).mask,
|
|
2997
|
-
[1, 0, 1, 0, 0])
|
|
2998
|
-
assert_equal(masked_not_equal(array([2, 2, 1, 2, 1],
|
|
2999
|
-
mask=[1, 0, 0, 0, 0]), 2).mask,
|
|
3000
|
-
[1, 0, 1, 0, 1])
|
|
3001
|
-
|
|
3002
|
-
def test_round(self):
|
|
3003
|
-
a = array([1.23456, 2.34567, 3.45678, 4.56789, 5.67890],
|
|
3004
|
-
mask=[0, 1, 0, 0, 0])
|
|
3005
|
-
assert_equal(a.round(), [1., 2., 3., 5., 6.])
|
|
3006
|
-
assert_equal(a.round(1), [1.2, 2.3, 3.5, 4.6, 5.7])
|
|
3007
|
-
assert_equal(a.round(3), [1.235, 2.346, 3.457, 4.568, 5.679])
|
|
3008
|
-
b = empty_like(a)
|
|
3009
|
-
a.round(out=b)
|
|
3010
|
-
assert_equal(b, [1., 2., 3., 5., 6.])
|
|
3011
|
-
|
|
3012
|
-
x = array([1., 2., 3., 4., 5.])
|
|
3013
|
-
c = array([1, 1, 1, 0, 0])
|
|
3014
|
-
x[2] = masked
|
|
3015
|
-
z = where(c, x, -x)
|
|
3016
|
-
assert_equal(z, [1., 2., 0., -4., -5])
|
|
3017
|
-
c[0] = masked
|
|
3018
|
-
z = where(c, x, -x)
|
|
3019
|
-
assert_equal(z, [1., 2., 0., -4., -5])
|
|
3020
|
-
assert_(z[0] is masked)
|
|
3021
|
-
assert_(z[1] is not masked)
|
|
3022
|
-
assert_(z[2] is masked)
|
|
3023
|
-
|
|
3024
|
-
def test_round_with_output(self):
|
|
3025
|
-
# Testing round with an explicit output
|
|
3026
|
-
|
|
3027
|
-
xm = array(np.random.uniform(0, 10, 12)).reshape(3, 4)
|
|
3028
|
-
xm[:, 0] = xm[0] = xm[-1, -1] = masked
|
|
3029
|
-
|
|
3030
|
-
# A ndarray as explicit input
|
|
3031
|
-
output = np.empty((3, 4), dtype=float)
|
|
3032
|
-
output.fill(-9999)
|
|
3033
|
-
result = np.round(xm, decimals=2, out=output)
|
|
3034
|
-
# ... the result should be the given output
|
|
3035
|
-
self.assertTrue(result is output)
|
|
3036
|
-
assert_equal(result, xm.round(decimals=2, out=output))
|
|
3037
|
-
#
|
|
3038
|
-
output = empty((3, 4), dtype=float)
|
|
3039
|
-
result = xm.round(decimals=2, out=output)
|
|
3040
|
-
self.assertTrue(result is output)
|
|
3041
|
-
|
|
3042
|
-
def test_identity(self):
|
|
3043
|
-
a = identity(5)
|
|
3044
|
-
self.assertTrue(isinstance(a, MaskedArray))
|
|
3045
|
-
assert_equal(a, np.identity(5))
|
|
3046
|
-
|
|
3047
|
-
def test_power(self):
|
|
3048
|
-
x = -1.1
|
|
3049
|
-
assert_almost_equal(power(x, 2.), 1.21)
|
|
3050
|
-
self.assertTrue(power(x, masked) is masked)
|
|
3051
|
-
x = array([-1.1, -1.1, 1.1, 1.1, 0.])
|
|
3052
|
-
b = array([0.5, 2., 0.5, 2., -1.], mask=[0, 0, 0, 0, 1])
|
|
3053
|
-
y = power(x, b)
|
|
3054
|
-
assert_almost_equal(y, [0, 1.21, 1.04880884817, 1.21, 0.])
|
|
3055
|
-
assert_equal(y._mask, [1, 0, 0, 0, 1])
|
|
3056
|
-
b.mask = nomask
|
|
3057
|
-
y = power(x, b)
|
|
3058
|
-
assert_equal(y._mask, [1, 0, 0, 0, 1])
|
|
3059
|
-
z = x ** b
|
|
3060
|
-
assert_equal(z._mask, y._mask)
|
|
3061
|
-
assert_almost_equal(z, y)
|
|
3062
|
-
assert_almost_equal(z._data, y._data)
|
|
3063
|
-
x **= b
|
|
3064
|
-
assert_equal(x._mask, y._mask)
|
|
3065
|
-
assert_almost_equal(x, y)
|
|
3066
|
-
assert_almost_equal(x._data, y._data)
|
|
3067
|
-
|
|
3068
|
-
def test_power_w_broadcasting(self):
|
|
3069
|
-
# Test power w/ broadcasting
|
|
3070
|
-
a2 = np.array([[1., 2., 3.], [4., 5., 6.]])
|
|
3071
|
-
a2m = array(a2, mask=[[1, 0, 0], [0, 0, 1]])
|
|
3072
|
-
b1 = np.array([2, 4, 3])
|
|
3073
|
-
b2 = np.array([b1, b1])
|
|
3074
|
-
b2m = array(b2, mask=[[0, 1, 0], [0, 1, 0]])
|
|
3075
|
-
#
|
|
3076
|
-
ctrl = array([[1 ** 2, 2 ** 4, 3 ** 3], [4 ** 2, 5 ** 4, 6 ** 3]],
|
|
3077
|
-
mask=[[1, 1, 0], [0, 1, 1]])
|
|
3078
|
-
# No broadcasting, base & exp w/ mask
|
|
3079
|
-
test = a2m ** b2m
|
|
3080
|
-
assert_equal(test, ctrl)
|
|
3081
|
-
assert_equal(test.mask, ctrl.mask)
|
|
3082
|
-
# No broadcasting, base w/ mask, exp w/o mask
|
|
3083
|
-
test = a2m ** b2
|
|
3084
|
-
assert_equal(test, ctrl)
|
|
3085
|
-
assert_equal(test.mask, a2m.mask)
|
|
3086
|
-
# No broadcasting, base w/o mask, exp w/ mask
|
|
3087
|
-
test = a2 ** b2m
|
|
3088
|
-
assert_equal(test, ctrl)
|
|
3089
|
-
assert_equal(test.mask, b2m.mask)
|
|
3090
|
-
#
|
|
3091
|
-
ctrl = array([[2 ** 2, 4 ** 4, 3 ** 3], [2 ** 2, 4 ** 4, 3 ** 3]],
|
|
3092
|
-
mask=[[0, 1, 0], [0, 1, 0]])
|
|
3093
|
-
test = b1 ** b2m
|
|
3094
|
-
assert_equal(test, ctrl)
|
|
3095
|
-
assert_equal(test.mask, ctrl.mask)
|
|
3096
|
-
test = b2m ** b1
|
|
3097
|
-
assert_equal(test, ctrl)
|
|
3098
|
-
assert_equal(test.mask, ctrl.mask)
|
|
3099
|
-
|
|
3100
|
-
def test_where(self):
|
|
3101
|
-
# Test the where function
|
|
3102
|
-
x = np.array([1., 1., 1., -2., pi/2.0, 4., 5., -10., 10., 1., 2., 3.])
|
|
3103
|
-
y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.])
|
|
3104
|
-
m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
|
3105
|
-
m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
|
|
3106
|
-
xm = masked_array(x, mask=m1)
|
|
3107
|
-
ym = masked_array(y, mask=m2)
|
|
3108
|
-
xm.set_fill_value(1e+20)
|
|
3109
|
-
#
|
|
3110
|
-
d = where(xm > 2, xm, -9)
|
|
3111
|
-
assert_equal(d, [-9., -9., -9., -9., -9., 4.,
|
|
3112
|
-
-9., -9., 10., -9., -9., 3.])
|
|
3113
|
-
assert_equal(d._mask, xm._mask)
|
|
3114
|
-
d = where(xm > 2, -9, ym)
|
|
3115
|
-
assert_equal(d, [5., 0., 3., 2., -1., -9.,
|
|
3116
|
-
-9., -10., -9., 1., 0., -9.])
|
|
3117
|
-
assert_equal(d._mask, [1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0])
|
|
3118
|
-
d = where(xm > 2, xm, masked)
|
|
3119
|
-
assert_equal(d, [-9., -9., -9., -9., -9., 4.,
|
|
3120
|
-
-9., -9., 10., -9., -9., 3.])
|
|
3121
|
-
tmp = xm._mask.copy()
|
|
3122
|
-
tmp[(xm <= 2).filled(True)] = True
|
|
3123
|
-
assert_equal(d._mask, tmp)
|
|
3124
|
-
#
|
|
3125
|
-
ixm = xm.astype(int)
|
|
3126
|
-
d = where(ixm > 2, ixm, masked)
|
|
3127
|
-
assert_equal(d, [-9, -9, -9, -9, -9, 4, -9, -9, 10, -9, -9, 3])
|
|
3128
|
-
assert_equal(d.dtype, ixm.dtype)
|
|
3129
|
-
|
|
3130
|
-
def test_where_with_masked_choice(self):
|
|
3131
|
-
x = arange(10)
|
|
3132
|
-
x[3] = masked
|
|
3133
|
-
c = x >= 8
|
|
3134
|
-
# Set False to masked
|
|
3135
|
-
z = where(c, x, masked)
|
|
3136
|
-
assert_(z.dtype is x.dtype)
|
|
3137
|
-
assert_(z[3] is masked)
|
|
3138
|
-
assert_(z[4] is masked)
|
|
3139
|
-
assert_(z[7] is masked)
|
|
3140
|
-
assert_(z[8] is not masked)
|
|
3141
|
-
assert_(z[9] is not masked)
|
|
3142
|
-
assert_equal(x, z)
|
|
3143
|
-
# Set True to masked
|
|
3144
|
-
z = where(c, masked, x)
|
|
3145
|
-
assert_(z.dtype is x.dtype)
|
|
3146
|
-
assert_(z[3] is masked)
|
|
3147
|
-
assert_(z[4] is not masked)
|
|
3148
|
-
assert_(z[7] is not masked)
|
|
3149
|
-
assert_(z[8] is masked)
|
|
3150
|
-
assert_(z[9] is masked)
|
|
3151
|
-
|
|
3152
|
-
def test_where_with_masked_condition(self):
|
|
3153
|
-
x = array([1., 2., 3., 4., 5.])
|
|
3154
|
-
c = array([1, 1, 1, 0, 0])
|
|
3155
|
-
x[2] = masked
|
|
3156
|
-
z = where(c, x, -x)
|
|
3157
|
-
assert_equal(z, [1., 2., 0., -4., -5])
|
|
3158
|
-
c[0] = masked
|
|
3159
|
-
z = where(c, x, -x)
|
|
3160
|
-
assert_equal(z, [1., 2., 0., -4., -5])
|
|
3161
|
-
assert_(z[0] is masked)
|
|
3162
|
-
assert_(z[1] is not masked)
|
|
3163
|
-
assert_(z[2] is masked)
|
|
3164
|
-
#
|
|
3165
|
-
x = arange(1, 6)
|
|
3166
|
-
x[-1] = masked
|
|
3167
|
-
y = arange(1, 6) * 10
|
|
3168
|
-
y[2] = masked
|
|
3169
|
-
c = array([1, 1, 1, 0, 0], mask=[1, 0, 0, 0, 0])
|
|
3170
|
-
cm = c.filled(1)
|
|
3171
|
-
z = where(c, x, y)
|
|
3172
|
-
zm = where(cm, x, y)
|
|
3173
|
-
assert_equal(z, zm)
|
|
3174
|
-
assert_(getmask(zm) is nomask)
|
|
3175
|
-
assert_equal(zm, [1, 2, 3, 40, 50])
|
|
3176
|
-
z = where(c, masked, 1)
|
|
3177
|
-
assert_equal(z, [99, 99, 99, 1, 1])
|
|
3178
|
-
z = where(c, 1, masked)
|
|
3179
|
-
assert_equal(z, [99, 1, 1, 99, 99])
|
|
3180
|
-
|
|
3181
|
-
def test_where_type(self):
|
|
3182
|
-
# Test the type conservation with where
|
|
3183
|
-
x = np.arange(4, dtype=np.int32)
|
|
3184
|
-
y = np.arange(4, dtype=np.float32) * 2.2
|
|
3185
|
-
test = where(x > 1.5, y, x).dtype
|
|
3186
|
-
control = np.find_common_type([np.int32, np.float32], [])
|
|
3187
|
-
assert_equal(test, control)
|
|
3188
|
-
|
|
3189
|
-
def test_choose(self):
|
|
3190
|
-
# Test choose
|
|
3191
|
-
choices = [[0, 1, 2, 3], [10, 11, 12, 13],
|
|
3192
|
-
[20, 21, 22, 23], [30, 31, 32, 33]]
|
|
3193
|
-
chosen = choose([2, 3, 1, 0], choices)
|
|
3194
|
-
assert_equal(chosen, array([20, 31, 12, 3]))
|
|
3195
|
-
chosen = choose([2, 4, 1, 0], choices, mode='clip')
|
|
3196
|
-
assert_equal(chosen, array([20, 31, 12, 3]))
|
|
3197
|
-
chosen = choose([2, 4, 1, 0], choices, mode='wrap')
|
|
3198
|
-
assert_equal(chosen, array([20, 1, 12, 3]))
|
|
3199
|
-
# Check with some masked indices
|
|
3200
|
-
indices_ = array([2, 4, 1, 0], mask=[1, 0, 0, 1])
|
|
3201
|
-
chosen = choose(indices_, choices, mode='wrap')
|
|
3202
|
-
assert_equal(chosen, array([99, 1, 12, 99]))
|
|
3203
|
-
assert_equal(chosen.mask, [1, 0, 0, 1])
|
|
3204
|
-
# Check with some masked choices
|
|
3205
|
-
choices = array(choices, mask=[[0, 0, 0, 1], [1, 1, 0, 1],
|
|
3206
|
-
[1, 0, 0, 0], [0, 0, 0, 0]])
|
|
3207
|
-
indices_ = [2, 3, 1, 0]
|
|
3208
|
-
chosen = choose(indices_, choices, mode='wrap')
|
|
3209
|
-
assert_equal(chosen, array([20, 31, 12, 3]))
|
|
3210
|
-
assert_equal(chosen.mask, [1, 0, 0, 1])
|
|
3211
|
-
|
|
3212
|
-
def test_choose_with_out(self):
|
|
3213
|
-
# Test choose with an explicit out keyword
|
|
3214
|
-
choices = [[0, 1, 2, 3], [10, 11, 12, 13],
|
|
3215
|
-
[20, 21, 22, 23], [30, 31, 32, 33]]
|
|
3216
|
-
store = empty(4, dtype=int)
|
|
3217
|
-
chosen = choose([2, 3, 1, 0], choices, out=store)
|
|
3218
|
-
assert_equal(store, array([20, 31, 12, 3]))
|
|
3219
|
-
self.assertTrue(store is chosen)
|
|
3220
|
-
# Check with some masked indices + out
|
|
3221
|
-
store = empty(4, dtype=int)
|
|
3222
|
-
indices_ = array([2, 3, 1, 0], mask=[1, 0, 0, 1])
|
|
3223
|
-
chosen = choose(indices_, choices, mode='wrap', out=store)
|
|
3224
|
-
assert_equal(store, array([99, 31, 12, 99]))
|
|
3225
|
-
assert_equal(store.mask, [1, 0, 0, 1])
|
|
3226
|
-
# Check with some masked choices + out ina ndarray !
|
|
3227
|
-
choices = array(choices, mask=[[0, 0, 0, 1], [1, 1, 0, 1],
|
|
3228
|
-
[1, 0, 0, 0], [0, 0, 0, 0]])
|
|
3229
|
-
indices_ = [2, 3, 1, 0]
|
|
3230
|
-
store = empty(4, dtype=int).view(ndarray)
|
|
3231
|
-
chosen = choose(indices_, choices, mode='wrap', out=store)
|
|
3232
|
-
assert_equal(store, array([999999, 31, 12, 999999]))
|
|
3233
|
-
|
|
3234
|
-
def test_reshape(self):
|
|
3235
|
-
a = arange(10)
|
|
3236
|
-
a[0] = masked
|
|
3237
|
-
# Try the default
|
|
3238
|
-
b = a.reshape((5, 2))
|
|
3239
|
-
assert_equal(b.shape, (5, 2))
|
|
3240
|
-
self.assertTrue(b.flags['C'])
|
|
3241
|
-
# Try w/ arguments as list instead of tuple
|
|
3242
|
-
b = a.reshape(5, 2)
|
|
3243
|
-
assert_equal(b.shape, (5, 2))
|
|
3244
|
-
self.assertTrue(b.flags['C'])
|
|
3245
|
-
# Try w/ order
|
|
3246
|
-
b = a.reshape((5, 2), order='F')
|
|
3247
|
-
assert_equal(b.shape, (5, 2))
|
|
3248
|
-
self.assertTrue(b.flags['F'])
|
|
3249
|
-
# Try w/ order
|
|
3250
|
-
b = a.reshape(5, 2, order='F')
|
|
3251
|
-
assert_equal(b.shape, (5, 2))
|
|
3252
|
-
self.assertTrue(b.flags['F'])
|
|
3253
|
-
#
|
|
3254
|
-
c = np.reshape(a, (2, 5))
|
|
3255
|
-
self.assertTrue(isinstance(c, MaskedArray))
|
|
3256
|
-
assert_equal(c.shape, (2, 5))
|
|
3257
|
-
self.assertTrue(c[0, 0] is masked)
|
|
3258
|
-
self.assertTrue(c.flags['C'])
|
|
3259
|
-
|
|
3260
|
-
def test_make_mask_descr(self):
|
|
3261
|
-
# Test make_mask_descr
|
|
3262
|
-
# Flexible
|
|
3263
|
-
ntype = [('a', np.float), ('b', np.float)]
|
|
3264
|
-
test = make_mask_descr(ntype)
|
|
3265
|
-
assert_equal(test, [('a', np.bool), ('b', np.bool)])
|
|
3266
|
-
# Standard w/ shape
|
|
3267
|
-
ntype = (np.float, 2)
|
|
3268
|
-
test = make_mask_descr(ntype)
|
|
3269
|
-
assert_equal(test, (np.bool, 2))
|
|
3270
|
-
# Standard standard
|
|
3271
|
-
ntype = np.float
|
|
3272
|
-
test = make_mask_descr(ntype)
|
|
3273
|
-
assert_equal(test, np.dtype(np.bool))
|
|
3274
|
-
# Nested
|
|
3275
|
-
ntype = [('a', np.float), ('b', [('ba', np.float), ('bb', np.float)])]
|
|
3276
|
-
test = make_mask_descr(ntype)
|
|
3277
|
-
control = np.dtype([('a', 'b1'), ('b', [('ba', 'b1'), ('bb', 'b1')])])
|
|
3278
|
-
assert_equal(test, control)
|
|
3279
|
-
# Named+ shape
|
|
3280
|
-
ntype = [('a', (np.float, 2))]
|
|
3281
|
-
test = make_mask_descr(ntype)
|
|
3282
|
-
assert_equal(test, np.dtype([('a', (np.bool, 2))]))
|
|
3283
|
-
# 2 names
|
|
3284
|
-
ntype = [(('A', 'a'), float)]
|
|
3285
|
-
test = make_mask_descr(ntype)
|
|
3286
|
-
assert_equal(test, np.dtype([(('A', 'a'), bool)]))
|
|
3287
|
-
|
|
3288
|
-
def test_make_mask(self):
|
|
3289
|
-
# Test make_mask
|
|
3290
|
-
# w/ a list as an input
|
|
3291
|
-
mask = [0, 1]
|
|
3292
|
-
test = make_mask(mask)
|
|
3293
|
-
assert_equal(test.dtype, MaskType)
|
|
3294
|
-
assert_equal(test, [0, 1])
|
|
3295
|
-
# w/ a ndarray as an input
|
|
3296
|
-
mask = np.array([0, 1], dtype=np.bool)
|
|
3297
|
-
test = make_mask(mask)
|
|
3298
|
-
assert_equal(test.dtype, MaskType)
|
|
3299
|
-
assert_equal(test, [0, 1])
|
|
3300
|
-
# w/ a flexible-type ndarray as an input - use default
|
|
3301
|
-
mdtype = [('a', np.bool), ('b', np.bool)]
|
|
3302
|
-
mask = np.array([(0, 0), (0, 1)], dtype=mdtype)
|
|
3303
|
-
test = make_mask(mask)
|
|
3304
|
-
assert_equal(test.dtype, MaskType)
|
|
3305
|
-
assert_equal(test, [1, 1])
|
|
3306
|
-
# w/ a flexible-type ndarray as an input - use input dtype
|
|
3307
|
-
mdtype = [('a', np.bool), ('b', np.bool)]
|
|
3308
|
-
mask = np.array([(0, 0), (0, 1)], dtype=mdtype)
|
|
3309
|
-
test = make_mask(mask, dtype=mask.dtype)
|
|
3310
|
-
assert_equal(test.dtype, mdtype)
|
|
3311
|
-
assert_equal(test, mask)
|
|
3312
|
-
# w/ a flexible-type ndarray as an input - use input dtype
|
|
3313
|
-
mdtype = [('a', np.float), ('b', np.float)]
|
|
3314
|
-
bdtype = [('a', np.bool), ('b', np.bool)]
|
|
3315
|
-
mask = np.array([(0, 0), (0, 1)], dtype=mdtype)
|
|
3316
|
-
test = make_mask(mask, dtype=mask.dtype)
|
|
3317
|
-
assert_equal(test.dtype, bdtype)
|
|
3318
|
-
assert_equal(test, np.array([(0, 0), (0, 1)], dtype=bdtype))
|
|
3319
|
-
|
|
3320
|
-
def test_mask_or(self):
|
|
3321
|
-
# Initialize
|
|
3322
|
-
mtype = [('a', np.bool), ('b', np.bool)]
|
|
3323
|
-
mask = np.array([(0, 0), (0, 1), (1, 0), (0, 0)], dtype=mtype)
|
|
3324
|
-
# Test using nomask as input
|
|
3325
|
-
test = mask_or(mask, nomask)
|
|
3326
|
-
assert_equal(test, mask)
|
|
3327
|
-
test = mask_or(nomask, mask)
|
|
3328
|
-
assert_equal(test, mask)
|
|
3329
|
-
# Using False as input
|
|
3330
|
-
test = mask_or(mask, False)
|
|
3331
|
-
assert_equal(test, mask)
|
|
3332
|
-
# Using True as input. Won't work, but keep it for the kicks
|
|
3333
|
-
# test = mask_or(mask, True)
|
|
3334
|
-
# control = np.array([(1, 1), (1, 1), (1, 1), (1, 1)], dtype=mtype)
|
|
3335
|
-
# assert_equal(test, control)
|
|
3336
|
-
# Using another array w / the same dtype
|
|
3337
|
-
other = np.array([(0, 1), (0, 1), (0, 1), (0, 1)], dtype=mtype)
|
|
3338
|
-
test = mask_or(mask, other)
|
|
3339
|
-
control = np.array([(0, 1), (0, 1), (1, 1), (0, 1)], dtype=mtype)
|
|
3340
|
-
assert_equal(test, control)
|
|
3341
|
-
# Using another array w / a different dtype
|
|
3342
|
-
othertype = [('A', np.bool), ('B', np.bool)]
|
|
3343
|
-
other = np.array([(0, 1), (0, 1), (0, 1), (0, 1)], dtype=othertype)
|
|
3344
|
-
try:
|
|
3345
|
-
test = mask_or(mask, other)
|
|
3346
|
-
except ValueError:
|
|
3347
|
-
pass
|
|
3348
|
-
# Using nested arrays
|
|
3349
|
-
dtype = [('a', np.bool), ('b', [('ba', np.bool), ('bb', np.bool)])]
|
|
3350
|
-
amask = np.array([(0, (1, 0)), (0, (1, 0))], dtype=dtype)
|
|
3351
|
-
bmask = np.array([(1, (0, 1)), (0, (0, 0))], dtype=dtype)
|
|
3352
|
-
cntrl = np.array([(1, (1, 1)), (0, (1, 0))], dtype=dtype)
|
|
3353
|
-
assert_equal(mask_or(amask, bmask), cntrl)
|
|
3354
|
-
|
|
3355
|
-
def test_flatten_mask(self):
|
|
3356
|
-
# Tests flatten mask
|
|
3357
|
-
# Standarad dtype
|
|
3358
|
-
mask = np.array([0, 0, 1], dtype=np.bool)
|
|
3359
|
-
assert_equal(flatten_mask(mask), mask)
|
|
3360
|
-
# Flexible dtype
|
|
3361
|
-
mask = np.array([(0, 0), (0, 1)], dtype=[('a', bool), ('b', bool)])
|
|
3362
|
-
test = flatten_mask(mask)
|
|
3363
|
-
control = np.array([0, 0, 0, 1], dtype=bool)
|
|
3364
|
-
assert_equal(test, control)
|
|
3365
|
-
|
|
3366
|
-
mdtype = [('a', bool), ('b', [('ba', bool), ('bb', bool)])]
|
|
3367
|
-
data = [(0, (0, 0)), (0, (0, 1))]
|
|
3368
|
-
mask = np.array(data, dtype=mdtype)
|
|
3369
|
-
test = flatten_mask(mask)
|
|
3370
|
-
control = np.array([0, 0, 0, 0, 0, 1], dtype=bool)
|
|
3371
|
-
assert_equal(test, control)
|
|
3372
|
-
|
|
3373
|
-
def test_on_ndarray(self):
|
|
3374
|
-
# Test functions on ndarrays
|
|
3375
|
-
a = np.array([1, 2, 3, 4])
|
|
3376
|
-
m = array(a, mask=False)
|
|
3377
|
-
test = anom(a)
|
|
3378
|
-
assert_equal(test, m.anom())
|
|
3379
|
-
test = reshape(a, (2, 2))
|
|
3380
|
-
assert_equal(test, m.reshape(2, 2))
|
|
3381
|
-
|
|
3382
|
-
def test_compress(self):
|
|
3383
|
-
# Test compress function on ndarray and masked array
|
|
3384
|
-
# Address Github #2495.
|
|
3385
|
-
arr = np.arange(8)
|
|
3386
|
-
arr.shape = 4, 2
|
|
3387
|
-
cond = np.array([True, False, True, True])
|
|
3388
|
-
control = arr[[0, 2, 3]]
|
|
3389
|
-
test = np.ma.compress(cond, arr, axis=0)
|
|
3390
|
-
assert_equal(test, control)
|
|
3391
|
-
marr = np.ma.array(arr)
|
|
3392
|
-
test = np.ma.compress(cond, marr, axis=0)
|
|
3393
|
-
assert_equal(test, control)
|
|
3394
|
-
|
|
3395
|
-
def test_compressed(self):
|
|
3396
|
-
# Test ma.compressed function.
|
|
3397
|
-
# Address gh-4026
|
|
3398
|
-
a = np.ma.array([1, 2])
|
|
3399
|
-
test = np.ma.compressed(a)
|
|
3400
|
-
assert_(type(test) is np.ndarray)
|
|
3401
|
-
# Test case when input data is ndarray subclass
|
|
3402
|
-
class A(np.ndarray):
|
|
3403
|
-
pass
|
|
3404
|
-
a = np.ma.array(A(shape=0))
|
|
3405
|
-
test = np.ma.compressed(a)
|
|
3406
|
-
assert_(type(test) is A)
|
|
3407
|
-
# Test that compress flattens
|
|
3408
|
-
test = np.ma.compressed([[1],[2]])
|
|
3409
|
-
assert_equal(test.ndim, 1)
|
|
3410
|
-
test = np.ma.compressed([[[[[1]]]]])
|
|
3411
|
-
assert_equal(test.ndim, 1)
|
|
3412
|
-
# Test case when input is MaskedArray subclass
|
|
3413
|
-
class M(MaskedArray):
|
|
3414
|
-
pass
|
|
3415
|
-
test = np.ma.compressed(M(shape=(0,1,2)))
|
|
3416
|
-
assert_equal(test.ndim, 1)
|
|
3417
|
-
# with .compessed() overriden
|
|
3418
|
-
class M(MaskedArray):
|
|
3419
|
-
def compressed(self):
|
|
3420
|
-
return 42
|
|
3421
|
-
test = np.ma.compressed(M(shape=(0,1,2)))
|
|
3422
|
-
assert_equal(test, 42)
|
|
3423
|
-
|
|
3424
|
-
#------------------------------------------------------------------------------
|
|
3425
|
-
class TestMaskedFields(TestCase):
|
|
3426
|
-
#
|
|
3427
|
-
def setUp(self):
|
|
3428
|
-
ilist = [1, 2, 3, 4, 5]
|
|
3429
|
-
flist = [1.1, 2.2, 3.3, 4.4, 5.5]
|
|
3430
|
-
slist = ['one', 'two', 'three', 'four', 'five']
|
|
3431
|
-
ddtype = [('a', int), ('b', float), ('c', '|S8')]
|
|
3432
|
-
mdtype = [('a', bool), ('b', bool), ('c', bool)]
|
|
3433
|
-
mask = [0, 1, 0, 0, 1]
|
|
3434
|
-
base = array(list(zip(ilist, flist, slist)), mask=mask, dtype=ddtype)
|
|
3435
|
-
self.data = dict(base=base, mask=mask, ddtype=ddtype, mdtype=mdtype)
|
|
3436
|
-
|
|
3437
|
-
def test_set_records_masks(self):
|
|
3438
|
-
base = self.data['base']
|
|
3439
|
-
mdtype = self.data['mdtype']
|
|
3440
|
-
# Set w/ nomask or masked
|
|
3441
|
-
base.mask = nomask
|
|
3442
|
-
assert_equal_records(base._mask, np.zeros(base.shape, dtype=mdtype))
|
|
3443
|
-
base.mask = masked
|
|
3444
|
-
assert_equal_records(base._mask, np.ones(base.shape, dtype=mdtype))
|
|
3445
|
-
# Set w/ simple boolean
|
|
3446
|
-
base.mask = False
|
|
3447
|
-
assert_equal_records(base._mask, np.zeros(base.shape, dtype=mdtype))
|
|
3448
|
-
base.mask = True
|
|
3449
|
-
assert_equal_records(base._mask, np.ones(base.shape, dtype=mdtype))
|
|
3450
|
-
# Set w/ list
|
|
3451
|
-
base.mask = [0, 0, 0, 1, 1]
|
|
3452
|
-
assert_equal_records(base._mask,
|
|
3453
|
-
np.array([(x, x, x) for x in [0, 0, 0, 1, 1]],
|
|
3454
|
-
dtype=mdtype))
|
|
3455
|
-
|
|
3456
|
-
def test_set_record_element(self):
|
|
3457
|
-
# Check setting an element of a record)
|
|
3458
|
-
base = self.data['base']
|
|
3459
|
-
(base_a, base_b, base_c) = (base['a'], base['b'], base['c'])
|
|
3460
|
-
base[0] = (pi, pi, 'pi')
|
|
3461
|
-
|
|
3462
|
-
assert_equal(base_a.dtype, int)
|
|
3463
|
-
assert_equal(base_a._data, [3, 2, 3, 4, 5])
|
|
3464
|
-
|
|
3465
|
-
assert_equal(base_b.dtype, float)
|
|
3466
|
-
assert_equal(base_b._data, [pi, 2.2, 3.3, 4.4, 5.5])
|
|
3467
|
-
|
|
3468
|
-
assert_equal(base_c.dtype, '|S8')
|
|
3469
|
-
assert_equal(base_c._data,
|
|
3470
|
-
asbytes_nested(['pi', 'two', 'three', 'four', 'five']))
|
|
3471
|
-
|
|
3472
|
-
def test_set_record_slice(self):
|
|
3473
|
-
base = self.data['base']
|
|
3474
|
-
(base_a, base_b, base_c) = (base['a'], base['b'], base['c'])
|
|
3475
|
-
base[:3] = (pi, pi, 'pi')
|
|
3476
|
-
|
|
3477
|
-
assert_equal(base_a.dtype, int)
|
|
3478
|
-
assert_equal(base_a._data, [3, 3, 3, 4, 5])
|
|
3479
|
-
|
|
3480
|
-
assert_equal(base_b.dtype, float)
|
|
3481
|
-
assert_equal(base_b._data, [pi, pi, pi, 4.4, 5.5])
|
|
3482
|
-
|
|
3483
|
-
assert_equal(base_c.dtype, '|S8')
|
|
3484
|
-
assert_equal(base_c._data,
|
|
3485
|
-
asbytes_nested(['pi', 'pi', 'pi', 'four', 'five']))
|
|
3486
|
-
|
|
3487
|
-
def test_mask_element(self):
|
|
3488
|
-
"Check record access"
|
|
3489
|
-
base = self.data['base']
|
|
3490
|
-
(base_a, base_b, base_c) = (base['a'], base['b'], base['c'])
|
|
3491
|
-
base[0] = masked
|
|
3492
|
-
#
|
|
3493
|
-
for n in ('a', 'b', 'c'):
|
|
3494
|
-
assert_equal(base[n].mask, [1, 1, 0, 0, 1])
|
|
3495
|
-
assert_equal(base[n]._data, base._data[n])
|
|
3496
|
-
|
|
3497
|
-
def test_getmaskarray(self):
|
|
3498
|
-
# Test getmaskarray on flexible dtype
|
|
3499
|
-
ndtype = [('a', int), ('b', float)]
|
|
3500
|
-
test = empty(3, dtype=ndtype)
|
|
3501
|
-
assert_equal(getmaskarray(test),
|
|
3502
|
-
np.array([(0, 0), (0, 0), (0, 0)],
|
|
3503
|
-
dtype=[('a', '|b1'), ('b', '|b1')]))
|
|
3504
|
-
test[:] = masked
|
|
3505
|
-
assert_equal(getmaskarray(test),
|
|
3506
|
-
np.array([(1, 1), (1, 1), (1, 1)],
|
|
3507
|
-
dtype=[('a', '|b1'), ('b', '|b1')]))
|
|
3508
|
-
|
|
3509
|
-
def test_view(self):
|
|
3510
|
-
# Test view w/ flexible dtype
|
|
3511
|
-
iterator = list(zip(np.arange(10), np.random.rand(10)))
|
|
3512
|
-
data = np.array(iterator)
|
|
3513
|
-
a = array(iterator, dtype=[('a', float), ('b', float)])
|
|
3514
|
-
a.mask[0] = (1, 0)
|
|
3515
|
-
controlmask = np.array([1] + 19 * [0], dtype=bool)
|
|
3516
|
-
# Transform globally to simple dtype
|
|
3517
|
-
test = a.view(float)
|
|
3518
|
-
assert_equal(test, data.ravel())
|
|
3519
|
-
assert_equal(test.mask, controlmask)
|
|
3520
|
-
# Transform globally to dty
|
|
3521
|
-
test = a.view((float, 2))
|
|
3522
|
-
assert_equal(test, data)
|
|
3523
|
-
assert_equal(test.mask, controlmask.reshape(-1, 2))
|
|
3524
|
-
#
|
|
3525
|
-
test = a.view((float, 2), np.matrix)
|
|
3526
|
-
assert_equal(test, data)
|
|
3527
|
-
self.assertTrue(isinstance(test, np.matrix))
|
|
3528
|
-
|
|
3529
|
-
def test_getitem(self):
|
|
3530
|
-
ndtype = [('a', float), ('b', float)]
|
|
3531
|
-
a = array(list(zip(np.random.rand(10), np.arange(10))), dtype=ndtype)
|
|
3532
|
-
a.mask = np.array(list(zip([0, 0, 0, 0, 0, 0, 0, 0, 1, 1],
|
|
3533
|
-
[1, 0, 0, 0, 0, 0, 0, 0, 1, 0])),
|
|
3534
|
-
dtype=[('a', bool), ('b', bool)])
|
|
3535
|
-
# No mask
|
|
3536
|
-
self.assertTrue(isinstance(a[1], MaskedArray))
|
|
3537
|
-
# One element masked
|
|
3538
|
-
self.assertTrue(isinstance(a[0], MaskedArray))
|
|
3539
|
-
assert_equal_records(a[0]._data, a._data[0])
|
|
3540
|
-
assert_equal_records(a[0]._mask, a._mask[0])
|
|
3541
|
-
# All element masked
|
|
3542
|
-
self.assertTrue(isinstance(a[-2], MaskedArray))
|
|
3543
|
-
assert_equal_records(a[-2]._data, a._data[-2])
|
|
3544
|
-
assert_equal_records(a[-2]._mask, a._mask[-2])
|
|
3545
|
-
|
|
3546
|
-
def test_setitem(self):
|
|
3547
|
-
# Issue 4866: check that one can set individual items in [record][col]
|
|
3548
|
-
# and [col][record] order
|
|
3549
|
-
ndtype = np.dtype([('a', float), ('b', int)])
|
|
3550
|
-
ma = np.ma.MaskedArray([(1.0, 1), (2.0, 2)], dtype=ndtype)
|
|
3551
|
-
ma['a'][1] = 3.0
|
|
3552
|
-
assert_equal(ma['a'], np.array([1.0, 3.0]))
|
|
3553
|
-
ma[1]['a'] = 4.0
|
|
3554
|
-
assert_equal(ma['a'], np.array([1.0, 4.0]))
|
|
3555
|
-
# Issue 2403
|
|
3556
|
-
mdtype = np.dtype([('a', bool), ('b', bool)])
|
|
3557
|
-
# soft mask
|
|
3558
|
-
control = np.array([(False, True), (True, True)], dtype=mdtype)
|
|
3559
|
-
a = np.ma.masked_all((2,), dtype=ndtype)
|
|
3560
|
-
a['a'][0] = 2
|
|
3561
|
-
assert_equal(a.mask, control)
|
|
3562
|
-
a = np.ma.masked_all((2,), dtype=ndtype)
|
|
3563
|
-
a[0]['a'] = 2
|
|
3564
|
-
assert_equal(a.mask, control)
|
|
3565
|
-
# hard mask
|
|
3566
|
-
control = np.array([(True, True), (True, True)], dtype=mdtype)
|
|
3567
|
-
a = np.ma.masked_all((2,), dtype=ndtype)
|
|
3568
|
-
a.harden_mask()
|
|
3569
|
-
a['a'][0] = 2
|
|
3570
|
-
assert_equal(a.mask, control)
|
|
3571
|
-
a = np.ma.masked_all((2,), dtype=ndtype)
|
|
3572
|
-
a.harden_mask()
|
|
3573
|
-
a[0]['a'] = 2
|
|
3574
|
-
assert_equal(a.mask, control)
|
|
3575
|
-
|
|
3576
|
-
def test_element_len(self):
|
|
3577
|
-
# check that len() works for mvoid (Github issue #576)
|
|
3578
|
-
for rec in self.data['base']:
|
|
3579
|
-
assert_equal(len(rec), len(self.data['ddtype']))
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
#------------------------------------------------------------------------------
|
|
3583
|
-
class TestMaskedView(TestCase):
|
|
3584
|
-
#
|
|
3585
|
-
def setUp(self):
|
|
3586
|
-
iterator = list(zip(np.arange(10), np.random.rand(10)))
|
|
3587
|
-
data = np.array(iterator)
|
|
3588
|
-
a = array(iterator, dtype=[('a', float), ('b', float)])
|
|
3589
|
-
a.mask[0] = (1, 0)
|
|
3590
|
-
controlmask = np.array([1] + 19 * [0], dtype=bool)
|
|
3591
|
-
self.data = (data, a, controlmask)
|
|
3592
|
-
|
|
3593
|
-
def test_view_to_nothing(self):
|
|
3594
|
-
(data, a, controlmask) = self.data
|
|
3595
|
-
test = a.view()
|
|
3596
|
-
self.assertTrue(isinstance(test, MaskedArray))
|
|
3597
|
-
assert_equal(test._data, a._data)
|
|
3598
|
-
assert_equal(test._mask, a._mask)
|
|
3599
|
-
|
|
3600
|
-
def test_view_to_type(self):
|
|
3601
|
-
(data, a, controlmask) = self.data
|
|
3602
|
-
test = a.view(np.ndarray)
|
|
3603
|
-
self.assertTrue(not isinstance(test, MaskedArray))
|
|
3604
|
-
assert_equal(test, a._data)
|
|
3605
|
-
assert_equal_records(test, data.view(a.dtype).squeeze())
|
|
3606
|
-
|
|
3607
|
-
def test_view_to_simple_dtype(self):
|
|
3608
|
-
(data, a, controlmask) = self.data
|
|
3609
|
-
# View globally
|
|
3610
|
-
test = a.view(float)
|
|
3611
|
-
self.assertTrue(isinstance(test, MaskedArray))
|
|
3612
|
-
assert_equal(test, data.ravel())
|
|
3613
|
-
assert_equal(test.mask, controlmask)
|
|
3614
|
-
|
|
3615
|
-
def test_view_to_flexible_dtype(self):
|
|
3616
|
-
(data, a, controlmask) = self.data
|
|
3617
|
-
#
|
|
3618
|
-
test = a.view([('A', float), ('B', float)])
|
|
3619
|
-
assert_equal(test.mask.dtype.names, ('A', 'B'))
|
|
3620
|
-
assert_equal(test['A'], a['a'])
|
|
3621
|
-
assert_equal(test['B'], a['b'])
|
|
3622
|
-
#
|
|
3623
|
-
test = a[0].view([('A', float), ('B', float)])
|
|
3624
|
-
self.assertTrue(isinstance(test, MaskedArray))
|
|
3625
|
-
assert_equal(test.mask.dtype.names, ('A', 'B'))
|
|
3626
|
-
assert_equal(test['A'], a['a'][0])
|
|
3627
|
-
assert_equal(test['B'], a['b'][0])
|
|
3628
|
-
#
|
|
3629
|
-
test = a[-1].view([('A', float), ('B', float)])
|
|
3630
|
-
self.assertTrue(isinstance(test, MaskedArray))
|
|
3631
|
-
assert_equal(test.dtype.names, ('A', 'B'))
|
|
3632
|
-
assert_equal(test['A'], a['a'][-1])
|
|
3633
|
-
assert_equal(test['B'], a['b'][-1])
|
|
3634
|
-
|
|
3635
|
-
def test_view_to_subdtype(self):
|
|
3636
|
-
(data, a, controlmask) = self.data
|
|
3637
|
-
# View globally
|
|
3638
|
-
test = a.view((float, 2))
|
|
3639
|
-
self.assertTrue(isinstance(test, MaskedArray))
|
|
3640
|
-
assert_equal(test, data)
|
|
3641
|
-
assert_equal(test.mask, controlmask.reshape(-1, 2))
|
|
3642
|
-
# View on 1 masked element
|
|
3643
|
-
test = a[0].view((float, 2))
|
|
3644
|
-
self.assertTrue(isinstance(test, MaskedArray))
|
|
3645
|
-
assert_equal(test, data[0])
|
|
3646
|
-
assert_equal(test.mask, (1, 0))
|
|
3647
|
-
# View on 1 unmasked element
|
|
3648
|
-
test = a[-1].view((float, 2))
|
|
3649
|
-
self.assertTrue(isinstance(test, MaskedArray))
|
|
3650
|
-
assert_equal(test, data[-1])
|
|
3651
|
-
|
|
3652
|
-
def test_view_to_dtype_and_type(self):
|
|
3653
|
-
(data, a, controlmask) = self.data
|
|
3654
|
-
#
|
|
3655
|
-
test = a.view((float, 2), np.matrix)
|
|
3656
|
-
assert_equal(test, data)
|
|
3657
|
-
self.assertTrue(isinstance(test, np.matrix))
|
|
3658
|
-
self.assertTrue(not isinstance(test, MaskedArray))
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
def test_masked_array():
|
|
3662
|
-
a = np.ma.array([0, 1, 2, 3], mask=[0, 0, 1, 0])
|
|
3663
|
-
assert_equal(np.argwhere(a), [[1], [3]])
|
|
3664
|
-
|
|
3665
|
-
def test_append_masked_array():
|
|
3666
|
-
a = np.ma.masked_equal([1,2,3], value=2)
|
|
3667
|
-
b = np.ma.masked_equal([4,3,2], value=2)
|
|
3668
|
-
|
|
3669
|
-
result = np.ma.append(a, b)
|
|
3670
|
-
expected_data = [1, 2, 3, 4, 3, 2]
|
|
3671
|
-
expected_mask = [False, True, False, False, False, True]
|
|
3672
|
-
assert_array_equal(result.data, expected_data)
|
|
3673
|
-
assert_array_equal(result.mask, expected_mask)
|
|
3674
|
-
|
|
3675
|
-
a = np.ma.masked_all((2,2))
|
|
3676
|
-
b = np.ma.ones((3,1))
|
|
3677
|
-
|
|
3678
|
-
result = np.ma.append(a, b)
|
|
3679
|
-
expected_data = [1] * 3
|
|
3680
|
-
expected_mask = [True] * 4 + [False] * 3
|
|
3681
|
-
assert_array_equal(result.data[-3], expected_data)
|
|
3682
|
-
assert_array_equal(result.mask, expected_mask)
|
|
3683
|
-
|
|
3684
|
-
result = np.ma.append(a, b, axis=None)
|
|
3685
|
-
assert_array_equal(result.data[-3], expected_data)
|
|
3686
|
-
assert_array_equal(result.mask, expected_mask)
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
def test_append_masked_array_along_axis():
|
|
3690
|
-
a = np.ma.masked_equal([1,2,3], value=2)
|
|
3691
|
-
b = np.ma.masked_values([[4, 5, 6], [7, 8, 9]], 7)
|
|
3692
|
-
|
|
3693
|
-
# When `axis` is specified, `values` must have the correct shape.
|
|
3694
|
-
assert_raises(ValueError, np.ma.append, a, b, axis=0)
|
|
3695
|
-
|
|
3696
|
-
result = np.ma.append(a[np.newaxis,:], b, axis=0)
|
|
3697
|
-
expected = np.ma.arange(1, 10)
|
|
3698
|
-
expected[[1, 6]] = np.ma.masked
|
|
3699
|
-
expected = expected.reshape((3,3))
|
|
3700
|
-
assert_array_equal(result.data, expected.data)
|
|
3701
|
-
assert_array_equal(result.mask, expected.mask)
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
###############################################################################
|
|
3705
|
-
if __name__ == "__main__":
|
|
3706
|
-
run_module_suite()
|