numpy 1.9.3__zip → 1.10.0__zip

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