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.

Potentially problematic release.


This version of numpy might be problematic. Click here for more details.

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,4239 @@
1
+ /*
2
+ * This file contains low-level loops for data type transfers.
3
+ * In particular the function PyArray_GetDTypeTransferFunction is
4
+ * implemented here.
5
+ *
6
+ * Copyright (c) 2010 by Mark Wiebe (mwwiebe@gmail.com)
7
+ * The Univerity of British Columbia
8
+ *
9
+ * See LICENSE.txt for the license.
10
+
11
+ */
12
+
13
+ #define PY_SSIZE_T_CLEAN
14
+ #include "Python.h"
15
+ #include "structmember.h"
16
+
17
+ #define NPY_NO_DEPRECATED_API NPY_API_VERSION
18
+ #define _MULTIARRAYMODULE
19
+ #include <numpy/arrayobject.h>
20
+ #include <numpy/npy_cpu.h>
21
+
22
+ #include "npy_pycompat.h"
23
+
24
+ #include "convert_datatype.h"
25
+ #include "_datetime.h"
26
+ #include "datetime_strings.h"
27
+
28
+ #include "shape.h"
29
+ #include "lowlevel_strided_loops.h"
30
+
31
+ #define NPY_LOWLEVEL_BUFFER_BLOCKSIZE 128
32
+
33
+ /********** PRINTF DEBUG TRACING **************/
34
+ #define NPY_DT_DBG_TRACING 0
35
+ /* Tracing incref/decref can be very noisy */
36
+ #define NPY_DT_REF_DBG_TRACING 0
37
+
38
+ #if NPY_DT_REF_DBG_TRACING
39
+ #define NPY_DT_DBG_REFTRACE(msg, ref) \
40
+ printf("%-12s %20p %s%d%s\n", msg, ref, \
41
+ ref ? "(refcnt " : "", \
42
+ ref ? (int)ref->ob_refcnt : 0, \
43
+ ref ? ((ref->ob_refcnt <= 0) ? \
44
+ ") <- BIG PROBLEM!!!!" : ")") : ""); \
45
+ fflush(stdout);
46
+ #else
47
+ #define NPY_DT_DBG_REFTRACE(msg, ref)
48
+ #endif
49
+ /**********************************************/
50
+
51
+ /*
52
+ * Returns a transfer function which DECREFs any references in src_type.
53
+ *
54
+ * Returns NPY_SUCCEED or NPY_FAIL.
55
+ */
56
+ static int
57
+ get_decsrcref_transfer_function(int aligned,
58
+ npy_intp src_stride,
59
+ PyArray_Descr *src_dtype,
60
+ PyArray_StridedUnaryOp **out_stransfer,
61
+ NpyAuxData **out_transferdata,
62
+ int *out_needs_api);
63
+
64
+ /*
65
+ * Returns a transfer function which zeros out the dest values.
66
+ *
67
+ * Returns NPY_SUCCEED or NPY_FAIL.
68
+ */
69
+ static int
70
+ get_setdstzero_transfer_function(int aligned,
71
+ npy_intp dst_stride,
72
+ PyArray_Descr *dst_dtype,
73
+ PyArray_StridedUnaryOp **out_stransfer,
74
+ NpyAuxData **out_transferdata,
75
+ int *out_needs_api);
76
+
77
+ /*
78
+ * Returns a transfer function which sets a boolean type to ones.
79
+ *
80
+ * Returns NPY_SUCCEED or NPY_FAIL.
81
+ */
82
+ NPY_NO_EXPORT int
83
+ get_bool_setdstone_transfer_function(npy_intp dst_stride,
84
+ PyArray_StridedUnaryOp **out_stransfer,
85
+ NpyAuxData **out_transferdata,
86
+ int *NPY_UNUSED(out_needs_api));
87
+
88
+ /*************************** COPY REFERENCES *******************************/
89
+
90
+ /* Moves references from src to dst */
91
+ static void
92
+ _strided_to_strided_move_references(char *dst, npy_intp dst_stride,
93
+ char *src, npy_intp src_stride,
94
+ npy_intp N, npy_intp src_itemsize,
95
+ NpyAuxData *data)
96
+ {
97
+ PyObject *src_ref = NULL, *dst_ref = NULL;
98
+ while (N > 0) {
99
+ NPY_COPY_PYOBJECT_PTR(&src_ref, src);
100
+ NPY_COPY_PYOBJECT_PTR(&dst_ref, dst);
101
+
102
+ /* Release the reference in dst */
103
+ NPY_DT_DBG_REFTRACE("dec dst ref", dst_ref);
104
+ Py_XDECREF(dst_ref);
105
+ /* Move the reference */
106
+ NPY_DT_DBG_REFTRACE("move src ref", src_ref);
107
+ NPY_COPY_PYOBJECT_PTR(dst, &src_ref);
108
+ /* Set the source reference to NULL */
109
+ src_ref = NULL;
110
+ NPY_COPY_PYOBJECT_PTR(src, &src_ref);
111
+
112
+ src += src_stride;
113
+ dst += dst_stride;
114
+ --N;
115
+ }
116
+ }
117
+
118
+ /* Copies references from src to dst */
119
+ static void
120
+ _strided_to_strided_copy_references(char *dst, npy_intp dst_stride,
121
+ char *src, npy_intp src_stride,
122
+ npy_intp N, npy_intp src_itemsize,
123
+ NpyAuxData *data)
124
+ {
125
+ PyObject *src_ref = NULL, *dst_ref = NULL;
126
+ while (N > 0) {
127
+ NPY_COPY_PYOBJECT_PTR(&src_ref, src);
128
+ NPY_COPY_PYOBJECT_PTR(&dst_ref, dst);
129
+
130
+ /* Copy the reference */
131
+ NPY_DT_DBG_REFTRACE("copy src ref", src_ref);
132
+ NPY_COPY_PYOBJECT_PTR(dst, &src_ref);
133
+ /* Claim the reference */
134
+ Py_XINCREF(src_ref);
135
+ /* Release the reference in dst */
136
+ NPY_DT_DBG_REFTRACE("dec dst ref", dst_ref);
137
+ Py_XDECREF(dst_ref);
138
+
139
+ src += src_stride;
140
+ dst += dst_stride;
141
+ --N;
142
+ }
143
+ }
144
+
145
+ /************************** ZERO-PADDED COPY ******************************/
146
+
147
+ /* Does a zero-padded copy */
148
+ typedef struct {
149
+ NpyAuxData base;
150
+ npy_intp dst_itemsize;
151
+ } _strided_zero_pad_data;
152
+
153
+ /* zero-padded data copy function */
154
+ static NpyAuxData *_strided_zero_pad_data_clone(NpyAuxData *data)
155
+ {
156
+ _strided_zero_pad_data *newdata =
157
+ (_strided_zero_pad_data *)PyArray_malloc(
158
+ sizeof(_strided_zero_pad_data));
159
+ if (newdata == NULL) {
160
+ return NULL;
161
+ }
162
+
163
+ memcpy(newdata, data, sizeof(_strided_zero_pad_data));
164
+
165
+ return (NpyAuxData *)newdata;
166
+ }
167
+
168
+ /*
169
+ * Does a strided to strided zero-padded copy for the case where
170
+ * dst_itemsize > src_itemsize
171
+ */
172
+ static void
173
+ _strided_to_strided_zero_pad_copy(char *dst, npy_intp dst_stride,
174
+ char *src, npy_intp src_stride,
175
+ npy_intp N, npy_intp src_itemsize,
176
+ NpyAuxData *data)
177
+ {
178
+ _strided_zero_pad_data *d = (_strided_zero_pad_data *)data;
179
+ npy_intp dst_itemsize = d->dst_itemsize;
180
+ npy_intp zero_size = dst_itemsize-src_itemsize;
181
+
182
+ while (N > 0) {
183
+ memcpy(dst, src, src_itemsize);
184
+ memset(dst + src_itemsize, 0, zero_size);
185
+ src += src_stride;
186
+ dst += dst_stride;
187
+ --N;
188
+ }
189
+ }
190
+
191
+ /*
192
+ * Does a strided to strided zero-padded copy for the case where
193
+ * dst_itemsize < src_itemsize
194
+ */
195
+ static void
196
+ _strided_to_strided_truncate_copy(char *dst, npy_intp dst_stride,
197
+ char *src, npy_intp src_stride,
198
+ npy_intp N, npy_intp src_itemsize,
199
+ NpyAuxData *data)
200
+ {
201
+ _strided_zero_pad_data *d = (_strided_zero_pad_data *)data;
202
+ npy_intp dst_itemsize = d->dst_itemsize;
203
+
204
+ while (N > 0) {
205
+ memcpy(dst, src, dst_itemsize);
206
+ src += src_stride;
207
+ dst += dst_stride;
208
+ --N;
209
+ }
210
+ }
211
+
212
+ NPY_NO_EXPORT int
213
+ PyArray_GetStridedZeroPadCopyFn(int aligned,
214
+ npy_intp src_stride, npy_intp dst_stride,
215
+ npy_intp src_itemsize, npy_intp dst_itemsize,
216
+ PyArray_StridedUnaryOp **out_stransfer,
217
+ NpyAuxData **out_transferdata)
218
+ {
219
+ if (src_itemsize == dst_itemsize) {
220
+ *out_stransfer = PyArray_GetStridedCopyFn(aligned, src_stride,
221
+ dst_stride, src_itemsize);
222
+ *out_transferdata = NULL;
223
+ return (*out_stransfer == NULL) ? NPY_FAIL : NPY_SUCCEED;
224
+ }
225
+ else {
226
+ _strided_zero_pad_data *d = PyArray_malloc(
227
+ sizeof(_strided_zero_pad_data));
228
+ if (d == NULL) {
229
+ PyErr_NoMemory();
230
+ return NPY_FAIL;
231
+ }
232
+ d->dst_itemsize = dst_itemsize;
233
+ d->base.free = (NpyAuxData_FreeFunc *)&PyArray_free;
234
+ d->base.clone = &_strided_zero_pad_data_clone;
235
+
236
+ if (src_itemsize < dst_itemsize) {
237
+ *out_stransfer = &_strided_to_strided_zero_pad_copy;
238
+ }
239
+ else {
240
+ *out_stransfer = &_strided_to_strided_truncate_copy;
241
+ }
242
+
243
+ *out_transferdata = (NpyAuxData *)d;
244
+ return NPY_SUCCEED;
245
+ }
246
+ }
247
+
248
+ /***************** WRAP ALIGNED CONTIGUOUS TRANSFER FUNCTION **************/
249
+
250
+ /* Wraps a transfer function + data in alignment code */
251
+ typedef struct {
252
+ NpyAuxData base;
253
+ PyArray_StridedUnaryOp *wrapped,
254
+ *tobuffer, *frombuffer;
255
+ NpyAuxData *wrappeddata, *todata, *fromdata;
256
+ npy_intp src_itemsize, dst_itemsize;
257
+ char *bufferin, *bufferout;
258
+ } _align_wrap_data;
259
+
260
+ /* transfer data free function */
261
+ static void _align_wrap_data_free(NpyAuxData *data)
262
+ {
263
+ _align_wrap_data *d = (_align_wrap_data *)data;
264
+ NPY_AUXDATA_FREE(d->wrappeddata);
265
+ NPY_AUXDATA_FREE(d->todata);
266
+ NPY_AUXDATA_FREE(d->fromdata);
267
+ PyArray_free(data);
268
+ }
269
+
270
+ /* transfer data copy function */
271
+ static NpyAuxData *_align_wrap_data_clone(NpyAuxData *data)
272
+ {
273
+ _align_wrap_data *d = (_align_wrap_data *)data;
274
+ _align_wrap_data *newdata;
275
+ npy_intp basedatasize, datasize;
276
+
277
+ /* Round up the structure size to 16-byte boundary */
278
+ basedatasize = (sizeof(_align_wrap_data)+15)&(-0x10);
279
+ /* Add space for two low level buffers */
280
+ datasize = basedatasize +
281
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE*d->src_itemsize +
282
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE*d->dst_itemsize;
283
+
284
+ /* Allocate the data, and populate it */
285
+ newdata = (_align_wrap_data *)PyArray_malloc(datasize);
286
+ if (newdata == NULL) {
287
+ return NULL;
288
+ }
289
+ memcpy(newdata, data, basedatasize);
290
+ newdata->bufferin = (char *)newdata + basedatasize;
291
+ newdata->bufferout = newdata->bufferin +
292
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE*newdata->src_itemsize;
293
+ if (newdata->wrappeddata != NULL) {
294
+ newdata->wrappeddata = NPY_AUXDATA_CLONE(d->wrappeddata);
295
+ if (newdata->wrappeddata == NULL) {
296
+ PyArray_free(newdata);
297
+ return NULL;
298
+ }
299
+ }
300
+ if (newdata->todata != NULL) {
301
+ newdata->todata = NPY_AUXDATA_CLONE(d->todata);
302
+ if (newdata->todata == NULL) {
303
+ NPY_AUXDATA_FREE(newdata->wrappeddata);
304
+ PyArray_free(newdata);
305
+ return NULL;
306
+ }
307
+ }
308
+ if (newdata->fromdata != NULL) {
309
+ newdata->fromdata = NPY_AUXDATA_CLONE(d->fromdata);
310
+ if (newdata->fromdata == NULL) {
311
+ NPY_AUXDATA_FREE(newdata->wrappeddata);
312
+ NPY_AUXDATA_FREE(newdata->todata);
313
+ PyArray_free(newdata);
314
+ return NULL;
315
+ }
316
+ }
317
+
318
+ return (NpyAuxData *)newdata;
319
+ }
320
+
321
+ static void
322
+ _strided_to_strided_contig_align_wrap(char *dst, npy_intp dst_stride,
323
+ char *src, npy_intp src_stride,
324
+ npy_intp N, npy_intp src_itemsize,
325
+ NpyAuxData *data)
326
+ {
327
+ _align_wrap_data *d = (_align_wrap_data *)data;
328
+ PyArray_StridedUnaryOp *wrapped = d->wrapped,
329
+ *tobuffer = d->tobuffer,
330
+ *frombuffer = d->frombuffer;
331
+ npy_intp inner_src_itemsize = d->src_itemsize,
332
+ dst_itemsize = d->dst_itemsize;
333
+ NpyAuxData *wrappeddata = d->wrappeddata,
334
+ *todata = d->todata,
335
+ *fromdata = d->fromdata;
336
+ char *bufferin = d->bufferin, *bufferout = d->bufferout;
337
+
338
+ for(;;) {
339
+ if (N > NPY_LOWLEVEL_BUFFER_BLOCKSIZE) {
340
+ tobuffer(bufferin, inner_src_itemsize, src, src_stride,
341
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE,
342
+ src_itemsize, todata);
343
+ wrapped(bufferout, dst_itemsize, bufferin, inner_src_itemsize,
344
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE,
345
+ inner_src_itemsize, wrappeddata);
346
+ frombuffer(dst, dst_stride, bufferout, dst_itemsize,
347
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE,
348
+ dst_itemsize, fromdata);
349
+ N -= NPY_LOWLEVEL_BUFFER_BLOCKSIZE;
350
+ src += NPY_LOWLEVEL_BUFFER_BLOCKSIZE*src_stride;
351
+ dst += NPY_LOWLEVEL_BUFFER_BLOCKSIZE*dst_stride;
352
+ }
353
+ else {
354
+ tobuffer(bufferin, inner_src_itemsize, src, src_stride, N,
355
+ src_itemsize, todata);
356
+ wrapped(bufferout, dst_itemsize, bufferin, inner_src_itemsize, N,
357
+ inner_src_itemsize, wrappeddata);
358
+ frombuffer(dst, dst_stride, bufferout, dst_itemsize, N,
359
+ dst_itemsize, fromdata);
360
+ return;
361
+ }
362
+ }
363
+ }
364
+
365
+ static void
366
+ _strided_to_strided_contig_align_wrap_init_dest(char *dst, npy_intp dst_stride,
367
+ char *src, npy_intp src_stride,
368
+ npy_intp N, npy_intp src_itemsize,
369
+ NpyAuxData *data)
370
+ {
371
+ _align_wrap_data *d = (_align_wrap_data *)data;
372
+ PyArray_StridedUnaryOp *wrapped = d->wrapped,
373
+ *tobuffer = d->tobuffer,
374
+ *frombuffer = d->frombuffer;
375
+ npy_intp inner_src_itemsize = d->src_itemsize,
376
+ dst_itemsize = d->dst_itemsize;
377
+ NpyAuxData *wrappeddata = d->wrappeddata,
378
+ *todata = d->todata,
379
+ *fromdata = d->fromdata;
380
+ char *bufferin = d->bufferin, *bufferout = d->bufferout;
381
+
382
+ for(;;) {
383
+ if (N > NPY_LOWLEVEL_BUFFER_BLOCKSIZE) {
384
+ tobuffer(bufferin, inner_src_itemsize, src, src_stride,
385
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE,
386
+ src_itemsize, todata);
387
+ memset(bufferout, 0, dst_itemsize*NPY_LOWLEVEL_BUFFER_BLOCKSIZE);
388
+ wrapped(bufferout, dst_itemsize, bufferin, inner_src_itemsize,
389
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE,
390
+ inner_src_itemsize, wrappeddata);
391
+ frombuffer(dst, dst_stride, bufferout, dst_itemsize,
392
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE,
393
+ dst_itemsize, fromdata);
394
+ N -= NPY_LOWLEVEL_BUFFER_BLOCKSIZE;
395
+ src += NPY_LOWLEVEL_BUFFER_BLOCKSIZE*src_stride;
396
+ dst += NPY_LOWLEVEL_BUFFER_BLOCKSIZE*dst_stride;
397
+ }
398
+ else {
399
+ tobuffer(bufferin, inner_src_itemsize, src, src_stride, N,
400
+ src_itemsize, todata);
401
+ memset(bufferout, 0, dst_itemsize*N);
402
+ wrapped(bufferout, dst_itemsize, bufferin, inner_src_itemsize, N,
403
+ inner_src_itemsize, wrappeddata);
404
+ frombuffer(dst, dst_stride, bufferout, dst_itemsize, N,
405
+ dst_itemsize, fromdata);
406
+ return;
407
+ }
408
+ }
409
+ }
410
+
411
+ /*
412
+ * Wraps an aligned contig to contig transfer function between either
413
+ * copies or byte swaps to temporary buffers.
414
+ *
415
+ * src_itemsize/dst_itemsize - The sizes of the src and dst datatypes.
416
+ * tobuffer - copy/swap function from src to an aligned contiguous buffer.
417
+ * todata - data for tobuffer
418
+ * frombuffer - copy/swap function from an aligned contiguous buffer to dst.
419
+ * fromdata - data for frombuffer
420
+ * wrapped - contig to contig transfer function being wrapped
421
+ * wrappeddata - data for wrapped
422
+ * init_dest - 1 means to memset the dest buffer to 0 before calling wrapped.
423
+ *
424
+ * Returns NPY_SUCCEED or NPY_FAIL.
425
+ */
426
+ NPY_NO_EXPORT int
427
+ wrap_aligned_contig_transfer_function(
428
+ npy_intp src_itemsize, npy_intp dst_itemsize,
429
+ PyArray_StridedUnaryOp *tobuffer, NpyAuxData *todata,
430
+ PyArray_StridedUnaryOp *frombuffer, NpyAuxData *fromdata,
431
+ PyArray_StridedUnaryOp *wrapped, NpyAuxData *wrappeddata,
432
+ int init_dest,
433
+ PyArray_StridedUnaryOp **out_stransfer,
434
+ NpyAuxData **out_transferdata)
435
+ {
436
+ _align_wrap_data *data;
437
+ npy_intp basedatasize, datasize;
438
+
439
+ /* Round up the structure size to 16-byte boundary */
440
+ basedatasize = (sizeof(_align_wrap_data)+15)&(-0x10);
441
+ /* Add space for two low level buffers */
442
+ datasize = basedatasize +
443
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE*src_itemsize +
444
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE*dst_itemsize;
445
+
446
+ /* Allocate the data, and populate it */
447
+ data = (_align_wrap_data *)PyArray_malloc(datasize);
448
+ if (data == NULL) {
449
+ PyErr_NoMemory();
450
+ return NPY_FAIL;
451
+ }
452
+ data->base.free = &_align_wrap_data_free;
453
+ data->base.clone = &_align_wrap_data_clone;
454
+ data->tobuffer = tobuffer;
455
+ data->todata = todata;
456
+ data->frombuffer = frombuffer;
457
+ data->fromdata = fromdata;
458
+ data->wrapped = wrapped;
459
+ data->wrappeddata = wrappeddata;
460
+ data->src_itemsize = src_itemsize;
461
+ data->dst_itemsize = dst_itemsize;
462
+ data->bufferin = (char *)data + basedatasize;
463
+ data->bufferout = data->bufferin +
464
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE*src_itemsize;
465
+
466
+ /* Set the function and data */
467
+ if (init_dest) {
468
+ *out_stransfer = &_strided_to_strided_contig_align_wrap_init_dest;
469
+ }
470
+ else {
471
+ *out_stransfer = &_strided_to_strided_contig_align_wrap;
472
+ }
473
+ *out_transferdata = (NpyAuxData *)data;
474
+
475
+ return NPY_SUCCEED;
476
+ }
477
+
478
+ /*************************** WRAP DTYPE COPY/SWAP *************************/
479
+ /* Wraps the dtype copy swap function */
480
+ typedef struct {
481
+ NpyAuxData base;
482
+ PyArray_CopySwapNFunc *copyswapn;
483
+ int swap;
484
+ PyArrayObject *arr;
485
+ } _wrap_copy_swap_data;
486
+
487
+ /* wrap copy swap data free function */
488
+ static void _wrap_copy_swap_data_free(NpyAuxData *data)
489
+ {
490
+ _wrap_copy_swap_data *d = (_wrap_copy_swap_data *)data;
491
+ Py_DECREF(d->arr);
492
+ PyArray_free(data);
493
+ }
494
+
495
+ /* wrap copy swap data copy function */
496
+ static NpyAuxData *_wrap_copy_swap_data_clone(NpyAuxData *data)
497
+ {
498
+ _wrap_copy_swap_data *newdata =
499
+ (_wrap_copy_swap_data *)PyArray_malloc(sizeof(_wrap_copy_swap_data));
500
+ if (newdata == NULL) {
501
+ return NULL;
502
+ }
503
+
504
+ memcpy(newdata, data, sizeof(_wrap_copy_swap_data));
505
+ Py_INCREF(newdata->arr);
506
+
507
+ return (NpyAuxData *)newdata;
508
+ }
509
+
510
+ static void
511
+ _strided_to_strided_wrap_copy_swap(char *dst, npy_intp dst_stride,
512
+ char *src, npy_intp src_stride,
513
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
514
+ NpyAuxData *data)
515
+ {
516
+ _wrap_copy_swap_data *d = (_wrap_copy_swap_data *)data;
517
+
518
+ d->copyswapn(dst, dst_stride, src, src_stride, N, d->swap, d->arr);
519
+ }
520
+
521
+ /* This only gets used for custom data types */
522
+ static int
523
+ wrap_copy_swap_function(int aligned,
524
+ npy_intp src_stride, npy_intp dst_stride,
525
+ PyArray_Descr *dtype,
526
+ int should_swap,
527
+ PyArray_StridedUnaryOp **out_stransfer,
528
+ NpyAuxData **out_transferdata)
529
+ {
530
+ _wrap_copy_swap_data *data;
531
+ npy_intp shape = 1;
532
+
533
+ /* Allocate the data for the copy swap */
534
+ data = (_wrap_copy_swap_data *)PyArray_malloc(sizeof(_wrap_copy_swap_data));
535
+ if (data == NULL) {
536
+ PyErr_NoMemory();
537
+ *out_stransfer = NULL;
538
+ *out_transferdata = NULL;
539
+ return NPY_FAIL;
540
+ }
541
+
542
+ data->base.free = &_wrap_copy_swap_data_free;
543
+ data->base.clone = &_wrap_copy_swap_data_clone;
544
+ data->copyswapn = dtype->f->copyswapn;
545
+ data->swap = should_swap;
546
+
547
+ /*
548
+ * TODO: This is a hack so the copyswap functions have an array.
549
+ * The copyswap functions shouldn't need that.
550
+ */
551
+ Py_INCREF(dtype);
552
+ data->arr = (PyArrayObject *)PyArray_NewFromDescr(&PyArray_Type, dtype,
553
+ 1, &shape, NULL, NULL, 0, NULL);
554
+ if (data->arr == NULL) {
555
+ PyArray_free(data);
556
+ return NPY_FAIL;
557
+ }
558
+
559
+ *out_stransfer = &_strided_to_strided_wrap_copy_swap;
560
+ *out_transferdata = (NpyAuxData *)data;
561
+
562
+ return NPY_SUCCEED;
563
+ }
564
+
565
+ /*************************** DTYPE CAST FUNCTIONS *************************/
566
+
567
+ /* Does a simple aligned cast */
568
+ typedef struct {
569
+ NpyAuxData base;
570
+ PyArray_VectorUnaryFunc *castfunc;
571
+ PyArrayObject *aip, *aop;
572
+ } _strided_cast_data;
573
+
574
+ /* strided cast data free function */
575
+ static void _strided_cast_data_free(NpyAuxData *data)
576
+ {
577
+ _strided_cast_data *d = (_strided_cast_data *)data;
578
+ Py_DECREF(d->aip);
579
+ Py_DECREF(d->aop);
580
+ PyArray_free(data);
581
+ }
582
+
583
+ /* strided cast data copy function */
584
+ static NpyAuxData *_strided_cast_data_clone(NpyAuxData *data)
585
+ {
586
+ _strided_cast_data *newdata =
587
+ (_strided_cast_data *)PyArray_malloc(sizeof(_strided_cast_data));
588
+ if (newdata == NULL) {
589
+ return NULL;
590
+ }
591
+
592
+ memcpy(newdata, data, sizeof(_strided_cast_data));
593
+ Py_INCREF(newdata->aip);
594
+ Py_INCREF(newdata->aop);
595
+
596
+ return (NpyAuxData *)newdata;
597
+ }
598
+
599
+ static void
600
+ _aligned_strided_to_strided_cast(char *dst, npy_intp dst_stride,
601
+ char *src, npy_intp src_stride,
602
+ npy_intp N, npy_intp src_itemsize,
603
+ NpyAuxData *data)
604
+ {
605
+ _strided_cast_data *d = (_strided_cast_data *)data;
606
+ PyArray_VectorUnaryFunc *castfunc = d->castfunc;
607
+ PyArrayObject *aip = d->aip, *aop = d->aop;
608
+
609
+ while (N > 0) {
610
+ castfunc(src, dst, 1, aip, aop);
611
+ dst += dst_stride;
612
+ src += src_stride;
613
+ --N;
614
+ }
615
+ }
616
+
617
+ /* This one requires src be of type NPY_OBJECT */
618
+ static void
619
+ _aligned_strided_to_strided_cast_decref_src(char *dst, npy_intp dst_stride,
620
+ char *src, npy_intp src_stride,
621
+ npy_intp N, npy_intp src_itemsize,
622
+ NpyAuxData *data)
623
+ {
624
+ _strided_cast_data *d = (_strided_cast_data *)data;
625
+ PyArray_VectorUnaryFunc *castfunc = d->castfunc;
626
+ PyArrayObject *aip = d->aip, *aop = d->aop;
627
+ PyObject *src_ref;
628
+
629
+ while (N > 0) {
630
+ castfunc(src, dst, 1, aip, aop);
631
+
632
+ /* After casting, decrement the source ref */
633
+ NPY_COPY_PYOBJECT_PTR(&src_ref, src);
634
+ NPY_DT_DBG_REFTRACE("dec src ref (cast object -> not object)", src_ref);
635
+ Py_XDECREF(src_ref);
636
+
637
+ dst += dst_stride;
638
+ src += src_stride;
639
+ --N;
640
+ }
641
+ }
642
+
643
+ static void
644
+ _aligned_contig_to_contig_cast(char *dst, npy_intp NPY_UNUSED(dst_stride),
645
+ char *src, npy_intp NPY_UNUSED(src_stride),
646
+ npy_intp N, npy_intp NPY_UNUSED(itemsize),
647
+ NpyAuxData *data)
648
+ {
649
+ _strided_cast_data *d = (_strided_cast_data *)data;
650
+
651
+ d->castfunc(src, dst, N, d->aip, d->aop);
652
+ }
653
+
654
+ static int
655
+ get_nbo_cast_numeric_transfer_function(int aligned,
656
+ npy_intp src_stride, npy_intp dst_stride,
657
+ int src_type_num, int dst_type_num,
658
+ PyArray_StridedUnaryOp **out_stransfer,
659
+ NpyAuxData **out_transferdata)
660
+ {
661
+ /* Emit a warning if complex imaginary is being cast away */
662
+ if (PyTypeNum_ISCOMPLEX(src_type_num) &&
663
+ !PyTypeNum_ISCOMPLEX(dst_type_num) &&
664
+ !PyTypeNum_ISBOOL(dst_type_num)) {
665
+ PyObject *cls = NULL, *obj = NULL;
666
+ int ret;
667
+ obj = PyImport_ImportModule("numpy.core");
668
+ if (obj) {
669
+ cls = PyObject_GetAttrString(obj, "ComplexWarning");
670
+ Py_DECREF(obj);
671
+ }
672
+ ret = PyErr_WarnEx(cls,
673
+ "Casting complex values to real discards "
674
+ "the imaginary part", 1);
675
+ Py_XDECREF(cls);
676
+ if (ret < 0) {
677
+ return NPY_FAIL;
678
+ }
679
+ }
680
+
681
+ *out_stransfer = PyArray_GetStridedNumericCastFn(aligned,
682
+ src_stride, dst_stride,
683
+ src_type_num, dst_type_num);
684
+ *out_transferdata = NULL;
685
+ if (*out_stransfer == NULL) {
686
+ PyErr_SetString(PyExc_ValueError,
687
+ "unexpected error in GetStridedNumericCastFn");
688
+ return NPY_FAIL;
689
+ }
690
+
691
+ return NPY_SUCCEED;
692
+ }
693
+
694
+ /*
695
+ * Does a datetime->datetime, timedelta->timedelta,
696
+ * datetime->ascii, or ascii->datetime cast
697
+ */
698
+ typedef struct {
699
+ NpyAuxData base;
700
+ /* The conversion fraction */
701
+ npy_int64 num, denom;
702
+ /* For the datetime -> string conversion, the dst string length */
703
+ npy_intp src_itemsize, dst_itemsize;
704
+ /*
705
+ * A buffer of size 'src_itemsize + 1', for when the input
706
+ * string is exactly of length src_itemsize with no NULL
707
+ * terminator.
708
+ */
709
+ char *tmp_buffer;
710
+ /*
711
+ * The metadata for when dealing with Months or Years
712
+ * which behave non-linearly with respect to the other
713
+ * units.
714
+ */
715
+ PyArray_DatetimeMetaData src_meta, dst_meta;
716
+ } _strided_datetime_cast_data;
717
+
718
+ /* strided datetime cast data free function */
719
+ static void _strided_datetime_cast_data_free(NpyAuxData *data)
720
+ {
721
+ _strided_datetime_cast_data *d = (_strided_datetime_cast_data *)data;
722
+ PyArray_free(d->tmp_buffer);
723
+ PyArray_free(data);
724
+ }
725
+
726
+ /* strided datetime cast data copy function */
727
+ static NpyAuxData *_strided_datetime_cast_data_clone(NpyAuxData *data)
728
+ {
729
+ _strided_datetime_cast_data *newdata =
730
+ (_strided_datetime_cast_data *)PyArray_malloc(
731
+ sizeof(_strided_datetime_cast_data));
732
+ if (newdata == NULL) {
733
+ return NULL;
734
+ }
735
+
736
+ memcpy(newdata, data, sizeof(_strided_datetime_cast_data));
737
+ if (newdata->tmp_buffer != NULL) {
738
+ newdata->tmp_buffer = PyArray_malloc(newdata->src_itemsize + 1);
739
+ if (newdata->tmp_buffer == NULL) {
740
+ PyArray_free(newdata);
741
+ return NULL;
742
+ }
743
+ }
744
+
745
+ return (NpyAuxData *)newdata;
746
+ }
747
+
748
+ static void
749
+ _strided_to_strided_datetime_general_cast(char *dst, npy_intp dst_stride,
750
+ char *src, npy_intp src_stride,
751
+ npy_intp N, npy_intp src_itemsize,
752
+ NpyAuxData *data)
753
+ {
754
+ _strided_datetime_cast_data *d = (_strided_datetime_cast_data *)data;
755
+ npy_int64 dt;
756
+ npy_datetimestruct dts;
757
+
758
+ while (N > 0) {
759
+ memcpy(&dt, src, sizeof(dt));
760
+
761
+ if (convert_datetime_to_datetimestruct(&d->src_meta,
762
+ dt, &dts) < 0) {
763
+ dt = NPY_DATETIME_NAT;
764
+ }
765
+ else {
766
+ if (convert_datetimestruct_to_datetime(&d->dst_meta,
767
+ &dts, &dt) < 0) {
768
+ dt = NPY_DATETIME_NAT;
769
+ }
770
+ }
771
+
772
+ memcpy(dst, &dt, sizeof(dt));
773
+
774
+ dst += dst_stride;
775
+ src += src_stride;
776
+ --N;
777
+ }
778
+ }
779
+
780
+ static void
781
+ _strided_to_strided_datetime_cast(char *dst, npy_intp dst_stride,
782
+ char *src, npy_intp src_stride,
783
+ npy_intp N, npy_intp src_itemsize,
784
+ NpyAuxData *data)
785
+ {
786
+ _strided_datetime_cast_data *d = (_strided_datetime_cast_data *)data;
787
+ npy_int64 num = d->num, denom = d->denom;
788
+ npy_int64 dt;
789
+
790
+ while (N > 0) {
791
+ memcpy(&dt, src, sizeof(dt));
792
+
793
+ if (dt != NPY_DATETIME_NAT) {
794
+ /* Apply the scaling */
795
+ if (dt < 0) {
796
+ dt = (dt * num - (denom - 1)) / denom;
797
+ }
798
+ else {
799
+ dt = dt * num / denom;
800
+ }
801
+ }
802
+
803
+ memcpy(dst, &dt, sizeof(dt));
804
+
805
+ dst += dst_stride;
806
+ src += src_stride;
807
+ --N;
808
+ }
809
+ }
810
+
811
+ static void
812
+ _aligned_strided_to_strided_datetime_cast(char *dst,
813
+ npy_intp dst_stride,
814
+ char *src, npy_intp src_stride,
815
+ npy_intp N, npy_intp src_itemsize,
816
+ NpyAuxData *data)
817
+ {
818
+ _strided_datetime_cast_data *d = (_strided_datetime_cast_data *)data;
819
+ npy_int64 num = d->num, denom = d->denom;
820
+ npy_int64 dt;
821
+
822
+ while (N > 0) {
823
+ dt = *(npy_int64 *)src;
824
+
825
+ if (dt != NPY_DATETIME_NAT) {
826
+ /* Apply the scaling */
827
+ if (dt < 0) {
828
+ dt = (dt * num - (denom - 1)) / denom;
829
+ }
830
+ else {
831
+ dt = dt * num / denom;
832
+ }
833
+ }
834
+
835
+ *(npy_int64 *)dst = dt;
836
+
837
+ dst += dst_stride;
838
+ src += src_stride;
839
+ --N;
840
+ }
841
+ }
842
+
843
+ static void
844
+ _strided_to_strided_datetime_to_string(char *dst, npy_intp dst_stride,
845
+ char *src, npy_intp src_stride,
846
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
847
+ NpyAuxData *data)
848
+ {
849
+ _strided_datetime_cast_data *d = (_strided_datetime_cast_data *)data;
850
+ npy_intp dst_itemsize = d->dst_itemsize;
851
+ npy_int64 dt;
852
+ npy_datetimestruct dts;
853
+
854
+ while (N > 0) {
855
+ memcpy(&dt, src, sizeof(dt));
856
+
857
+ if (convert_datetime_to_datetimestruct(&d->src_meta,
858
+ dt, &dts) < 0) {
859
+ /* For an error, produce a 'NaT' string */
860
+ dts.year = NPY_DATETIME_NAT;
861
+ }
862
+
863
+ /* Initialize the destination to all zeros */
864
+ memset(dst, 0, dst_itemsize);
865
+
866
+ /*
867
+ * This may also raise an error, but the caller needs
868
+ * to use PyErr_Occurred().
869
+ */
870
+ make_iso_8601_datetime(&dts, dst, dst_itemsize,
871
+ 0, d->src_meta.base, -1,
872
+ NPY_UNSAFE_CASTING);
873
+
874
+ dst += dst_stride;
875
+ src += src_stride;
876
+ --N;
877
+ }
878
+ }
879
+
880
+ static void
881
+ _strided_to_strided_string_to_datetime(char *dst, npy_intp dst_stride,
882
+ char *src, npy_intp src_stride,
883
+ npy_intp N, npy_intp src_itemsize,
884
+ NpyAuxData *data)
885
+ {
886
+ _strided_datetime_cast_data *d = (_strided_datetime_cast_data *)data;
887
+ npy_datetimestruct dts;
888
+ char *tmp_buffer = d->tmp_buffer;
889
+ char *tmp;
890
+
891
+ while (N > 0) {
892
+ npy_int64 dt = ~NPY_DATETIME_NAT;
893
+
894
+ /* Replicating strnlen with memchr, because Mac OS X lacks it */
895
+ tmp = memchr(src, '\0', src_itemsize);
896
+
897
+ /* If the string is all full, use the buffer */
898
+ if (tmp == NULL) {
899
+ memcpy(tmp_buffer, src, src_itemsize);
900
+ tmp_buffer[src_itemsize] = '\0';
901
+
902
+ if (parse_iso_8601_datetime(tmp_buffer, src_itemsize,
903
+ d->dst_meta.base, NPY_SAME_KIND_CASTING,
904
+ &dts, NULL, NULL, NULL) < 0) {
905
+ dt = NPY_DATETIME_NAT;
906
+ }
907
+ }
908
+ /* Otherwise parse the data in place */
909
+ else {
910
+ if (parse_iso_8601_datetime(src, tmp - src,
911
+ d->dst_meta.base, NPY_SAME_KIND_CASTING,
912
+ &dts, NULL, NULL, NULL) < 0) {
913
+ dt = NPY_DATETIME_NAT;
914
+ }
915
+ }
916
+
917
+ /* Convert to the datetime */
918
+ if (dt != NPY_DATETIME_NAT &&
919
+ convert_datetimestruct_to_datetime(&d->dst_meta,
920
+ &dts, &dt) < 0) {
921
+ dt = NPY_DATETIME_NAT;
922
+ }
923
+
924
+ memcpy(dst, &dt, sizeof(dt));
925
+
926
+ dst += dst_stride;
927
+ src += src_stride;
928
+ --N;
929
+ }
930
+ }
931
+
932
+ /*
933
+ * Assumes src_dtype and dst_dtype are both datetimes or both timedeltas
934
+ */
935
+ static int
936
+ get_nbo_cast_datetime_transfer_function(int aligned,
937
+ npy_intp src_stride, npy_intp dst_stride,
938
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
939
+ PyArray_StridedUnaryOp **out_stransfer,
940
+ NpyAuxData **out_transferdata)
941
+ {
942
+ PyArray_DatetimeMetaData *src_meta, *dst_meta;
943
+ npy_int64 num = 0, denom = 0;
944
+ _strided_datetime_cast_data *data;
945
+
946
+ src_meta = get_datetime_metadata_from_dtype(src_dtype);
947
+ if (src_meta == NULL) {
948
+ return NPY_FAIL;
949
+ }
950
+ dst_meta = get_datetime_metadata_from_dtype(dst_dtype);
951
+ if (dst_meta == NULL) {
952
+ return NPY_FAIL;
953
+ }
954
+
955
+ get_datetime_conversion_factor(src_meta, dst_meta, &num, &denom);
956
+
957
+ if (num == 0) {
958
+ return NPY_FAIL;
959
+ }
960
+
961
+ /* Allocate the data for the casting */
962
+ data = (_strided_datetime_cast_data *)PyArray_malloc(
963
+ sizeof(_strided_datetime_cast_data));
964
+ if (data == NULL) {
965
+ PyErr_NoMemory();
966
+ *out_stransfer = NULL;
967
+ *out_transferdata = NULL;
968
+ return NPY_FAIL;
969
+ }
970
+ data->base.free = &_strided_datetime_cast_data_free;
971
+ data->base.clone = &_strided_datetime_cast_data_clone;
972
+ data->num = num;
973
+ data->denom = denom;
974
+ data->tmp_buffer = NULL;
975
+
976
+ /*
977
+ * Special case the datetime (but not timedelta) with the nonlinear
978
+ * units (years and months). For timedelta, an average
979
+ * years and months value is used.
980
+ */
981
+ if (src_dtype->type_num == NPY_DATETIME &&
982
+ (src_meta->base == NPY_FR_Y ||
983
+ src_meta->base == NPY_FR_M ||
984
+ dst_meta->base == NPY_FR_Y ||
985
+ dst_meta->base == NPY_FR_M)) {
986
+ memcpy(&data->src_meta, src_meta, sizeof(data->src_meta));
987
+ memcpy(&data->dst_meta, dst_meta, sizeof(data->dst_meta));
988
+ *out_stransfer = &_strided_to_strided_datetime_general_cast;
989
+ }
990
+ else if (aligned) {
991
+ *out_stransfer = &_aligned_strided_to_strided_datetime_cast;
992
+ }
993
+ else {
994
+ *out_stransfer = &_strided_to_strided_datetime_cast;
995
+ }
996
+ *out_transferdata = (NpyAuxData *)data;
997
+
998
+ #if NPY_DT_DBG_TRACING
999
+ printf("Dtype transfer from ");
1000
+ PyObject_Print((PyObject *)src_dtype, stdout, 0);
1001
+ printf(" to ");
1002
+ PyObject_Print((PyObject *)dst_dtype, stdout, 0);
1003
+ printf("\n");
1004
+ printf("has conversion fraction %lld/%lld\n", num, denom);
1005
+ #endif
1006
+
1007
+
1008
+ return NPY_SUCCEED;
1009
+ }
1010
+
1011
+ static int
1012
+ get_nbo_datetime_to_string_transfer_function(int aligned,
1013
+ npy_intp src_stride, npy_intp dst_stride,
1014
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1015
+ PyArray_StridedUnaryOp **out_stransfer,
1016
+ NpyAuxData **out_transferdata)
1017
+ {
1018
+ PyArray_DatetimeMetaData *src_meta;
1019
+ _strided_datetime_cast_data *data;
1020
+
1021
+ src_meta = get_datetime_metadata_from_dtype(src_dtype);
1022
+ if (src_meta == NULL) {
1023
+ return NPY_FAIL;
1024
+ }
1025
+
1026
+ /* Allocate the data for the casting */
1027
+ data = (_strided_datetime_cast_data *)PyArray_malloc(
1028
+ sizeof(_strided_datetime_cast_data));
1029
+ if (data == NULL) {
1030
+ PyErr_NoMemory();
1031
+ *out_stransfer = NULL;
1032
+ *out_transferdata = NULL;
1033
+ return NPY_FAIL;
1034
+ }
1035
+ data->base.free = &_strided_datetime_cast_data_free;
1036
+ data->base.clone = &_strided_datetime_cast_data_clone;
1037
+ data->dst_itemsize = dst_dtype->elsize;
1038
+ data->tmp_buffer = NULL;
1039
+
1040
+ memcpy(&data->src_meta, src_meta, sizeof(data->src_meta));
1041
+
1042
+ *out_stransfer = &_strided_to_strided_datetime_to_string;
1043
+ *out_transferdata = (NpyAuxData *)data;
1044
+
1045
+ #if NPY_DT_DBG_TRACING
1046
+ printf("Dtype transfer from ");
1047
+ PyObject_Print((PyObject *)src_dtype, stdout, 0);
1048
+ printf(" to ");
1049
+ PyObject_Print((PyObject *)dst_dtype, stdout, 0);
1050
+ printf("\n");
1051
+ #endif
1052
+
1053
+ return NPY_SUCCEED;
1054
+ }
1055
+
1056
+ static int
1057
+ get_datetime_to_unicode_transfer_function(int aligned,
1058
+ npy_intp src_stride, npy_intp dst_stride,
1059
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1060
+ PyArray_StridedUnaryOp **out_stransfer,
1061
+ NpyAuxData **out_transferdata,
1062
+ int *out_needs_api)
1063
+ {
1064
+ NpyAuxData *castdata = NULL, *todata = NULL, *fromdata = NULL;
1065
+ PyArray_StridedUnaryOp *caststransfer, *tobuffer, *frombuffer;
1066
+ PyArray_Descr *str_dtype;
1067
+
1068
+ /* Get an ASCII string data type, adapted to match the UNICODE one */
1069
+ str_dtype = PyArray_DescrFromType(NPY_STRING);
1070
+ PyArray_AdaptFlexibleDType(NULL, dst_dtype, &str_dtype);
1071
+ if (str_dtype == NULL) {
1072
+ return NPY_FAIL;
1073
+ }
1074
+
1075
+ /* Get the copy/swap operation to dst */
1076
+ if (PyArray_GetDTypeCopySwapFn(aligned,
1077
+ src_stride, src_dtype->elsize,
1078
+ src_dtype,
1079
+ &tobuffer, &todata) != NPY_SUCCEED) {
1080
+ Py_DECREF(str_dtype);
1081
+ return NPY_FAIL;
1082
+ }
1083
+
1084
+ /* Get the NBO datetime to string aligned contig function */
1085
+ if (get_nbo_datetime_to_string_transfer_function(1,
1086
+ src_dtype->elsize, str_dtype->elsize,
1087
+ src_dtype, str_dtype,
1088
+ &caststransfer, &castdata) != NPY_SUCCEED) {
1089
+ Py_DECREF(str_dtype);
1090
+ NPY_AUXDATA_FREE(todata);
1091
+ return NPY_FAIL;
1092
+ }
1093
+
1094
+ /* Get the cast operation to dst */
1095
+ if (PyArray_GetDTypeTransferFunction(aligned,
1096
+ str_dtype->elsize, dst_stride,
1097
+ str_dtype, dst_dtype,
1098
+ 0,
1099
+ &frombuffer, &fromdata,
1100
+ out_needs_api) != NPY_SUCCEED) {
1101
+ Py_DECREF(str_dtype);
1102
+ NPY_AUXDATA_FREE(todata);
1103
+ NPY_AUXDATA_FREE(castdata);
1104
+ return NPY_FAIL;
1105
+ }
1106
+
1107
+ /* Wrap it all up in a new transfer function + data */
1108
+ if (wrap_aligned_contig_transfer_function(
1109
+ src_dtype->elsize, str_dtype->elsize,
1110
+ tobuffer, todata,
1111
+ frombuffer, fromdata,
1112
+ caststransfer, castdata,
1113
+ PyDataType_FLAGCHK(str_dtype, NPY_NEEDS_INIT),
1114
+ out_stransfer, out_transferdata) != NPY_SUCCEED) {
1115
+ NPY_AUXDATA_FREE(castdata);
1116
+ NPY_AUXDATA_FREE(todata);
1117
+ NPY_AUXDATA_FREE(fromdata);
1118
+ return NPY_FAIL;
1119
+ }
1120
+
1121
+ Py_DECREF(str_dtype);
1122
+
1123
+ return NPY_SUCCEED;
1124
+ }
1125
+
1126
+ static int
1127
+ get_nbo_string_to_datetime_transfer_function(int aligned,
1128
+ npy_intp src_stride, npy_intp dst_stride,
1129
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1130
+ PyArray_StridedUnaryOp **out_stransfer,
1131
+ NpyAuxData **out_transferdata)
1132
+ {
1133
+ PyArray_DatetimeMetaData *dst_meta;
1134
+ _strided_datetime_cast_data *data;
1135
+
1136
+ dst_meta = get_datetime_metadata_from_dtype(dst_dtype);
1137
+ if (dst_meta == NULL) {
1138
+ return NPY_FAIL;
1139
+ }
1140
+
1141
+ /* Allocate the data for the casting */
1142
+ data = (_strided_datetime_cast_data *)PyArray_malloc(
1143
+ sizeof(_strided_datetime_cast_data));
1144
+ if (data == NULL) {
1145
+ PyErr_NoMemory();
1146
+ *out_stransfer = NULL;
1147
+ *out_transferdata = NULL;
1148
+ return NPY_FAIL;
1149
+ }
1150
+ data->base.free = &_strided_datetime_cast_data_free;
1151
+ data->base.clone = &_strided_datetime_cast_data_clone;
1152
+ data->src_itemsize = src_dtype->elsize;
1153
+ data->tmp_buffer = PyArray_malloc(data->src_itemsize + 1);
1154
+ if (data->tmp_buffer == NULL) {
1155
+ PyErr_NoMemory();
1156
+ PyArray_free(data);
1157
+ *out_stransfer = NULL;
1158
+ *out_transferdata = NULL;
1159
+ return NPY_FAIL;
1160
+ }
1161
+
1162
+ memcpy(&data->dst_meta, dst_meta, sizeof(data->dst_meta));
1163
+
1164
+ *out_stransfer = &_strided_to_strided_string_to_datetime;
1165
+ *out_transferdata = (NpyAuxData *)data;
1166
+
1167
+ #if NPY_DT_DBG_TRACING
1168
+ printf("Dtype transfer from ");
1169
+ PyObject_Print((PyObject *)src_dtype, stdout, 0);
1170
+ printf(" to ");
1171
+ PyObject_Print((PyObject *)dst_dtype, stdout, 0);
1172
+ printf("\n");
1173
+ #endif
1174
+
1175
+ return NPY_SUCCEED;
1176
+ }
1177
+
1178
+ static int
1179
+ get_unicode_to_datetime_transfer_function(int aligned,
1180
+ npy_intp src_stride, npy_intp dst_stride,
1181
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1182
+ PyArray_StridedUnaryOp **out_stransfer,
1183
+ NpyAuxData **out_transferdata,
1184
+ int *out_needs_api)
1185
+ {
1186
+ NpyAuxData *castdata = NULL, *todata = NULL, *fromdata = NULL;
1187
+ PyArray_StridedUnaryOp *caststransfer, *tobuffer, *frombuffer;
1188
+ PyArray_Descr *str_dtype;
1189
+
1190
+ /* Get an ASCII string data type, adapted to match the UNICODE one */
1191
+ str_dtype = PyArray_DescrFromType(NPY_STRING);
1192
+ PyArray_AdaptFlexibleDType(NULL, src_dtype, &str_dtype);
1193
+ if (str_dtype == NULL) {
1194
+ return NPY_FAIL;
1195
+ }
1196
+
1197
+ /* Get the cast operation from src */
1198
+ if (PyArray_GetDTypeTransferFunction(aligned,
1199
+ src_stride, str_dtype->elsize,
1200
+ src_dtype, str_dtype,
1201
+ 0,
1202
+ &tobuffer, &todata,
1203
+ out_needs_api) != NPY_SUCCEED) {
1204
+ Py_DECREF(str_dtype);
1205
+ return NPY_FAIL;
1206
+ }
1207
+
1208
+ /* Get the string to NBO datetime aligned contig function */
1209
+ if (get_nbo_string_to_datetime_transfer_function(1,
1210
+ str_dtype->elsize, dst_dtype->elsize,
1211
+ str_dtype, dst_dtype,
1212
+ &caststransfer, &castdata) != NPY_SUCCEED) {
1213
+ Py_DECREF(str_dtype);
1214
+ NPY_AUXDATA_FREE(todata);
1215
+ return NPY_FAIL;
1216
+ }
1217
+
1218
+ /* Get the copy/swap operation to dst */
1219
+ if (PyArray_GetDTypeCopySwapFn(aligned,
1220
+ dst_dtype->elsize, dst_stride,
1221
+ dst_dtype,
1222
+ &frombuffer, &fromdata) != NPY_SUCCEED) {
1223
+ Py_DECREF(str_dtype);
1224
+ NPY_AUXDATA_FREE(todata);
1225
+ NPY_AUXDATA_FREE(castdata);
1226
+ return NPY_FAIL;
1227
+ }
1228
+
1229
+ /* Wrap it all up in a new transfer function + data */
1230
+ if (wrap_aligned_contig_transfer_function(
1231
+ str_dtype->elsize, dst_dtype->elsize,
1232
+ tobuffer, todata,
1233
+ frombuffer, fromdata,
1234
+ caststransfer, castdata,
1235
+ PyDataType_FLAGCHK(dst_dtype, NPY_NEEDS_INIT),
1236
+ out_stransfer, out_transferdata) != NPY_SUCCEED) {
1237
+ Py_DECREF(str_dtype);
1238
+ NPY_AUXDATA_FREE(castdata);
1239
+ NPY_AUXDATA_FREE(todata);
1240
+ NPY_AUXDATA_FREE(fromdata);
1241
+ return NPY_FAIL;
1242
+ }
1243
+
1244
+ Py_DECREF(str_dtype);
1245
+
1246
+ return NPY_SUCCEED;
1247
+ }
1248
+
1249
+ static int
1250
+ get_nbo_cast_transfer_function(int aligned,
1251
+ npy_intp src_stride, npy_intp dst_stride,
1252
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1253
+ int move_references,
1254
+ PyArray_StridedUnaryOp **out_stransfer,
1255
+ NpyAuxData **out_transferdata,
1256
+ int *out_needs_api,
1257
+ int *out_needs_wrap)
1258
+ {
1259
+ _strided_cast_data *data;
1260
+ PyArray_VectorUnaryFunc *castfunc;
1261
+ PyArray_Descr *tmp_dtype;
1262
+ npy_intp shape = 1, src_itemsize = src_dtype->elsize,
1263
+ dst_itemsize = dst_dtype->elsize;
1264
+
1265
+ if (PyTypeNum_ISNUMBER(src_dtype->type_num) &&
1266
+ PyTypeNum_ISNUMBER(dst_dtype->type_num)) {
1267
+ *out_needs_wrap = !PyArray_ISNBO(src_dtype->byteorder) ||
1268
+ !PyArray_ISNBO(dst_dtype->byteorder);
1269
+ return get_nbo_cast_numeric_transfer_function(aligned,
1270
+ src_stride, dst_stride,
1271
+ src_dtype->type_num, dst_dtype->type_num,
1272
+ out_stransfer, out_transferdata);
1273
+ }
1274
+
1275
+ if (src_dtype->type_num == NPY_DATETIME ||
1276
+ src_dtype->type_num == NPY_TIMEDELTA ||
1277
+ dst_dtype->type_num == NPY_DATETIME ||
1278
+ dst_dtype->type_num == NPY_TIMEDELTA) {
1279
+ /* A parameterized type, datetime->datetime sometimes needs casting */
1280
+ if ((src_dtype->type_num == NPY_DATETIME &&
1281
+ dst_dtype->type_num == NPY_DATETIME) ||
1282
+ (src_dtype->type_num == NPY_TIMEDELTA &&
1283
+ dst_dtype->type_num == NPY_TIMEDELTA)) {
1284
+ *out_needs_wrap = !PyArray_ISNBO(src_dtype->byteorder) ||
1285
+ !PyArray_ISNBO(dst_dtype->byteorder);
1286
+ return get_nbo_cast_datetime_transfer_function(aligned,
1287
+ src_stride, dst_stride,
1288
+ src_dtype, dst_dtype,
1289
+ out_stransfer, out_transferdata);
1290
+ }
1291
+
1292
+ /*
1293
+ * Datetime <-> string conversions can be handled specially.
1294
+ * The functions may raise an error if the strings have no
1295
+ * space, or can't be parsed properly.
1296
+ */
1297
+ if (src_dtype->type_num == NPY_DATETIME) {
1298
+ switch (dst_dtype->type_num) {
1299
+ case NPY_STRING:
1300
+ *out_needs_api = 1;
1301
+ *out_needs_wrap = !PyArray_ISNBO(src_dtype->byteorder);
1302
+ return get_nbo_datetime_to_string_transfer_function(
1303
+ aligned,
1304
+ src_stride, dst_stride,
1305
+ src_dtype, dst_dtype,
1306
+ out_stransfer, out_transferdata);
1307
+
1308
+ case NPY_UNICODE:
1309
+ return get_datetime_to_unicode_transfer_function(
1310
+ aligned,
1311
+ src_stride, dst_stride,
1312
+ src_dtype, dst_dtype,
1313
+ out_stransfer, out_transferdata,
1314
+ out_needs_api);
1315
+ }
1316
+ }
1317
+ else if (dst_dtype->type_num == NPY_DATETIME) {
1318
+ switch (src_dtype->type_num) {
1319
+ case NPY_STRING:
1320
+ *out_needs_api = 1;
1321
+ *out_needs_wrap = !PyArray_ISNBO(dst_dtype->byteorder);
1322
+ return get_nbo_string_to_datetime_transfer_function(
1323
+ aligned,
1324
+ src_stride, dst_stride,
1325
+ src_dtype, dst_dtype,
1326
+ out_stransfer, out_transferdata);
1327
+
1328
+ case NPY_UNICODE:
1329
+ return get_unicode_to_datetime_transfer_function(
1330
+ aligned,
1331
+ src_stride, dst_stride,
1332
+ src_dtype, dst_dtype,
1333
+ out_stransfer, out_transferdata,
1334
+ out_needs_api);
1335
+ }
1336
+ }
1337
+ }
1338
+
1339
+ *out_needs_wrap = !aligned ||
1340
+ !PyArray_ISNBO(src_dtype->byteorder) ||
1341
+ !PyArray_ISNBO(dst_dtype->byteorder);
1342
+
1343
+ /* Check the data types whose casting functions use API calls */
1344
+ switch (src_dtype->type_num) {
1345
+ case NPY_OBJECT:
1346
+ case NPY_STRING:
1347
+ case NPY_UNICODE:
1348
+ case NPY_VOID:
1349
+ if (out_needs_api) {
1350
+ *out_needs_api = 1;
1351
+ }
1352
+ break;
1353
+ }
1354
+ switch (dst_dtype->type_num) {
1355
+ case NPY_OBJECT:
1356
+ case NPY_STRING:
1357
+ case NPY_UNICODE:
1358
+ case NPY_VOID:
1359
+ if (out_needs_api) {
1360
+ *out_needs_api = 1;
1361
+ }
1362
+ break;
1363
+ }
1364
+
1365
+ if (PyDataType_FLAGCHK(src_dtype, NPY_NEEDS_PYAPI) ||
1366
+ PyDataType_FLAGCHK(dst_dtype, NPY_NEEDS_PYAPI)) {
1367
+ if (out_needs_api) {
1368
+ *out_needs_api = 1;
1369
+ }
1370
+ }
1371
+
1372
+ /* Get the cast function */
1373
+ castfunc = PyArray_GetCastFunc(src_dtype, dst_dtype->type_num);
1374
+ if (!castfunc) {
1375
+ *out_stransfer = NULL;
1376
+ *out_transferdata = NULL;
1377
+ return NPY_FAIL;
1378
+ }
1379
+
1380
+ /* Allocate the data for the casting */
1381
+ data = (_strided_cast_data *)PyArray_malloc(sizeof(_strided_cast_data));
1382
+ if (data == NULL) {
1383
+ PyErr_NoMemory();
1384
+ *out_stransfer = NULL;
1385
+ *out_transferdata = NULL;
1386
+ return NPY_FAIL;
1387
+ }
1388
+ data->base.free = &_strided_cast_data_free;
1389
+ data->base.clone = &_strided_cast_data_clone;
1390
+ data->castfunc = castfunc;
1391
+ /*
1392
+ * TODO: This is a hack so the cast functions have an array.
1393
+ * The cast functions shouldn't need that. Also, since we
1394
+ * always handle byte order conversions, this array should
1395
+ * have native byte order.
1396
+ */
1397
+ if (PyArray_ISNBO(src_dtype->byteorder)) {
1398
+ tmp_dtype = src_dtype;
1399
+ Py_INCREF(tmp_dtype);
1400
+ }
1401
+ else {
1402
+ tmp_dtype = PyArray_DescrNewByteorder(src_dtype, NPY_NATIVE);
1403
+ if (tmp_dtype == NULL) {
1404
+ PyArray_free(data);
1405
+ return NPY_FAIL;
1406
+ }
1407
+ }
1408
+ data->aip = (PyArrayObject *)PyArray_NewFromDescr(&PyArray_Type, tmp_dtype,
1409
+ 1, &shape, NULL, NULL, 0, NULL);
1410
+ if (data->aip == NULL) {
1411
+ PyArray_free(data);
1412
+ return NPY_FAIL;
1413
+ }
1414
+ /*
1415
+ * TODO: This is a hack so the cast functions have an array.
1416
+ * The cast functions shouldn't need that. Also, since we
1417
+ * always handle byte order conversions, this array should
1418
+ * have native byte order.
1419
+ */
1420
+ if (PyArray_ISNBO(dst_dtype->byteorder)) {
1421
+ tmp_dtype = dst_dtype;
1422
+ Py_INCREF(tmp_dtype);
1423
+ }
1424
+ else {
1425
+ tmp_dtype = PyArray_DescrNewByteorder(dst_dtype, NPY_NATIVE);
1426
+ if (tmp_dtype == NULL) {
1427
+ Py_DECREF(data->aip);
1428
+ PyArray_free(data);
1429
+ return NPY_FAIL;
1430
+ }
1431
+ }
1432
+ data->aop = (PyArrayObject *)PyArray_NewFromDescr(&PyArray_Type, tmp_dtype,
1433
+ 1, &shape, NULL, NULL, 0, NULL);
1434
+ if (data->aop == NULL) {
1435
+ Py_DECREF(data->aip);
1436
+ PyArray_free(data);
1437
+ return NPY_FAIL;
1438
+ }
1439
+
1440
+ /* If it's aligned and all native byte order, we're all done */
1441
+ if (move_references && src_dtype->type_num == NPY_OBJECT) {
1442
+ *out_stransfer = _aligned_strided_to_strided_cast_decref_src;
1443
+ }
1444
+ else {
1445
+ /*
1446
+ * Use the contig version if the strides are contiguous or
1447
+ * we're telling the caller to wrap the return, because
1448
+ * the wrapping uses a contiguous buffer.
1449
+ */
1450
+ if ((src_stride == src_itemsize && dst_stride == dst_itemsize) ||
1451
+ *out_needs_wrap) {
1452
+ *out_stransfer = _aligned_contig_to_contig_cast;
1453
+ }
1454
+ else {
1455
+ *out_stransfer = _aligned_strided_to_strided_cast;
1456
+ }
1457
+ }
1458
+ *out_transferdata = (NpyAuxData *)data;
1459
+
1460
+ return NPY_SUCCEED;
1461
+ }
1462
+
1463
+ static int
1464
+ get_cast_transfer_function(int aligned,
1465
+ npy_intp src_stride, npy_intp dst_stride,
1466
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1467
+ int move_references,
1468
+ PyArray_StridedUnaryOp **out_stransfer,
1469
+ NpyAuxData **out_transferdata,
1470
+ int *out_needs_api)
1471
+ {
1472
+ PyArray_StridedUnaryOp *caststransfer;
1473
+ NpyAuxData *castdata, *todata = NULL, *fromdata = NULL;
1474
+ int needs_wrap = 0;
1475
+ npy_intp src_itemsize = src_dtype->elsize,
1476
+ dst_itemsize = dst_dtype->elsize;
1477
+
1478
+ if (get_nbo_cast_transfer_function(aligned,
1479
+ src_stride, dst_stride,
1480
+ src_dtype, dst_dtype,
1481
+ move_references,
1482
+ &caststransfer,
1483
+ &castdata,
1484
+ out_needs_api,
1485
+ &needs_wrap) != NPY_SUCCEED) {
1486
+ return NPY_FAIL;
1487
+ }
1488
+
1489
+ /*
1490
+ * If all native byte order and doesn't need alignment wrapping,
1491
+ * return the function
1492
+ */
1493
+ if (!needs_wrap) {
1494
+ *out_stransfer = caststransfer;
1495
+ *out_transferdata = castdata;
1496
+
1497
+ return NPY_SUCCEED;
1498
+ }
1499
+ /* Otherwise, we have to copy and/or swap to aligned temporaries */
1500
+ else {
1501
+ PyArray_StridedUnaryOp *tobuffer, *frombuffer;
1502
+
1503
+ /* Get the copy/swap operation from src */
1504
+ PyArray_GetDTypeCopySwapFn(aligned,
1505
+ src_stride, src_itemsize,
1506
+ src_dtype,
1507
+ &tobuffer, &todata);
1508
+
1509
+
1510
+ /* Get the copy/swap operation to dst */
1511
+ PyArray_GetDTypeCopySwapFn(aligned,
1512
+ dst_itemsize, dst_stride,
1513
+ dst_dtype,
1514
+ &frombuffer, &fromdata);
1515
+
1516
+ if (frombuffer == NULL || tobuffer == NULL) {
1517
+ NPY_AUXDATA_FREE(castdata);
1518
+ NPY_AUXDATA_FREE(todata);
1519
+ NPY_AUXDATA_FREE(fromdata);
1520
+ return NPY_FAIL;
1521
+ }
1522
+
1523
+ *out_stransfer = caststransfer;
1524
+
1525
+ /* Wrap it all up in a new transfer function + data */
1526
+ if (wrap_aligned_contig_transfer_function(
1527
+ src_itemsize, dst_itemsize,
1528
+ tobuffer, todata,
1529
+ frombuffer, fromdata,
1530
+ caststransfer, castdata,
1531
+ PyDataType_FLAGCHK(dst_dtype, NPY_NEEDS_INIT),
1532
+ out_stransfer, out_transferdata) != NPY_SUCCEED) {
1533
+ NPY_AUXDATA_FREE(castdata);
1534
+ NPY_AUXDATA_FREE(todata);
1535
+ NPY_AUXDATA_FREE(fromdata);
1536
+ return NPY_FAIL;
1537
+ }
1538
+
1539
+ return NPY_SUCCEED;
1540
+ }
1541
+ }
1542
+
1543
+ /**************************** COPY 1 TO N CONTIGUOUS ************************/
1544
+
1545
+ /* Copies 1 element to N contiguous elements */
1546
+ typedef struct {
1547
+ NpyAuxData base;
1548
+ PyArray_StridedUnaryOp *stransfer;
1549
+ NpyAuxData *data;
1550
+ npy_intp N, dst_itemsize;
1551
+ /* If this is non-NULL the source type has references needing a decref */
1552
+ PyArray_StridedUnaryOp *stransfer_finish_src;
1553
+ NpyAuxData *data_finish_src;
1554
+ } _one_to_n_data;
1555
+
1556
+ /* transfer data free function */
1557
+ static void _one_to_n_data_free(NpyAuxData *data)
1558
+ {
1559
+ _one_to_n_data *d = (_one_to_n_data *)data;
1560
+ NPY_AUXDATA_FREE(d->data);
1561
+ NPY_AUXDATA_FREE(d->data_finish_src);
1562
+ PyArray_free(data);
1563
+ }
1564
+
1565
+ /* transfer data copy function */
1566
+ static NpyAuxData *_one_to_n_data_clone(NpyAuxData *data)
1567
+ {
1568
+ _one_to_n_data *d = (_one_to_n_data *)data;
1569
+ _one_to_n_data *newdata;
1570
+
1571
+ /* Allocate the data, and populate it */
1572
+ newdata = (_one_to_n_data *)PyArray_malloc(sizeof(_one_to_n_data));
1573
+ if (newdata == NULL) {
1574
+ return NULL;
1575
+ }
1576
+ memcpy(newdata, data, sizeof(_one_to_n_data));
1577
+ if (d->data != NULL) {
1578
+ newdata->data = NPY_AUXDATA_CLONE(d->data);
1579
+ if (newdata->data == NULL) {
1580
+ PyArray_free(newdata);
1581
+ return NULL;
1582
+ }
1583
+ }
1584
+ if (d->data_finish_src != NULL) {
1585
+ newdata->data_finish_src = NPY_AUXDATA_CLONE(d->data_finish_src);
1586
+ if (newdata->data_finish_src == NULL) {
1587
+ NPY_AUXDATA_FREE(newdata->data);
1588
+ PyArray_free(newdata);
1589
+ return NULL;
1590
+ }
1591
+ }
1592
+
1593
+ return (NpyAuxData *)newdata;
1594
+ }
1595
+
1596
+ static void
1597
+ _strided_to_strided_one_to_n(char *dst, npy_intp dst_stride,
1598
+ char *src, npy_intp src_stride,
1599
+ npy_intp N, npy_intp src_itemsize,
1600
+ NpyAuxData *data)
1601
+ {
1602
+ _one_to_n_data *d = (_one_to_n_data *)data;
1603
+ PyArray_StridedUnaryOp *subtransfer = d->stransfer;
1604
+ NpyAuxData *subdata = d->data;
1605
+ npy_intp subN = d->N, dst_itemsize = d->dst_itemsize;
1606
+
1607
+ while (N > 0) {
1608
+ subtransfer(dst, dst_itemsize,
1609
+ src, 0,
1610
+ subN, src_itemsize,
1611
+ subdata);
1612
+
1613
+ src += src_stride;
1614
+ dst += dst_stride;
1615
+ --N;
1616
+ }
1617
+ }
1618
+
1619
+ static void
1620
+ _strided_to_strided_one_to_n_with_finish(char *dst, npy_intp dst_stride,
1621
+ char *src, npy_intp src_stride,
1622
+ npy_intp N, npy_intp src_itemsize,
1623
+ NpyAuxData *data)
1624
+ {
1625
+ _one_to_n_data *d = (_one_to_n_data *)data;
1626
+ PyArray_StridedUnaryOp *subtransfer = d->stransfer,
1627
+ *stransfer_finish_src = d->stransfer_finish_src;
1628
+ NpyAuxData *subdata = d->data, *data_finish_src = d->data_finish_src;
1629
+ npy_intp subN = d->N, dst_itemsize = d->dst_itemsize;
1630
+
1631
+ while (N > 0) {
1632
+ subtransfer(dst, dst_itemsize,
1633
+ src, 0,
1634
+ subN, src_itemsize,
1635
+ subdata);
1636
+
1637
+
1638
+ stransfer_finish_src(NULL, 0,
1639
+ src, 0,
1640
+ 1, src_itemsize,
1641
+ data_finish_src);
1642
+
1643
+ src += src_stride;
1644
+ dst += dst_stride;
1645
+ --N;
1646
+ }
1647
+ }
1648
+
1649
+ /*
1650
+ * Wraps a transfer function to produce one that copies one element
1651
+ * of src to N contiguous elements of dst. If stransfer_finish_src is
1652
+ * not NULL, it should be a transfer function which just affects
1653
+ * src, for example to do a final DECREF operation for references.
1654
+ */
1655
+ static int
1656
+ wrap_transfer_function_one_to_n(
1657
+ PyArray_StridedUnaryOp *stransfer_inner,
1658
+ NpyAuxData *data_inner,
1659
+ PyArray_StridedUnaryOp *stransfer_finish_src,
1660
+ NpyAuxData *data_finish_src,
1661
+ npy_intp dst_itemsize,
1662
+ npy_intp N,
1663
+ PyArray_StridedUnaryOp **out_stransfer,
1664
+ NpyAuxData **out_transferdata)
1665
+ {
1666
+ _one_to_n_data *data;
1667
+
1668
+
1669
+ data = PyArray_malloc(sizeof(_one_to_n_data));
1670
+ if (data == NULL) {
1671
+ PyErr_NoMemory();
1672
+ return NPY_FAIL;
1673
+ }
1674
+
1675
+ data->base.free = &_one_to_n_data_free;
1676
+ data->base.clone = &_one_to_n_data_clone;
1677
+ data->stransfer = stransfer_inner;
1678
+ data->data = data_inner;
1679
+ data->stransfer_finish_src = stransfer_finish_src;
1680
+ data->data_finish_src = data_finish_src;
1681
+ data->N = N;
1682
+ data->dst_itemsize = dst_itemsize;
1683
+
1684
+ if (stransfer_finish_src == NULL) {
1685
+ *out_stransfer = &_strided_to_strided_one_to_n;
1686
+ }
1687
+ else {
1688
+ *out_stransfer = &_strided_to_strided_one_to_n_with_finish;
1689
+ }
1690
+ *out_transferdata = (NpyAuxData *)data;
1691
+
1692
+ return NPY_SUCCEED;
1693
+ }
1694
+
1695
+ static int
1696
+ get_one_to_n_transfer_function(int aligned,
1697
+ npy_intp src_stride, npy_intp dst_stride,
1698
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1699
+ int move_references,
1700
+ npy_intp N,
1701
+ PyArray_StridedUnaryOp **out_stransfer,
1702
+ NpyAuxData **out_transferdata,
1703
+ int *out_needs_api)
1704
+ {
1705
+ PyArray_StridedUnaryOp *stransfer, *stransfer_finish_src = NULL;
1706
+ NpyAuxData *data, *data_finish_src = NULL;
1707
+
1708
+ /*
1709
+ * move_references is set to 0, handled in the wrapping transfer fn,
1710
+ * src_stride is set to zero, because its 1 to N copying,
1711
+ * and dst_stride is set to contiguous, because subarrays are always
1712
+ * contiguous.
1713
+ */
1714
+ if (PyArray_GetDTypeTransferFunction(aligned,
1715
+ 0, dst_dtype->elsize,
1716
+ src_dtype, dst_dtype,
1717
+ 0,
1718
+ &stransfer, &data,
1719
+ out_needs_api) != NPY_SUCCEED) {
1720
+ return NPY_FAIL;
1721
+ }
1722
+
1723
+ /* If the src object will need a DECREF, set src_dtype */
1724
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
1725
+ if (get_decsrcref_transfer_function(aligned,
1726
+ src_stride,
1727
+ src_dtype,
1728
+ &stransfer_finish_src,
1729
+ &data_finish_src,
1730
+ out_needs_api) != NPY_SUCCEED) {
1731
+ NPY_AUXDATA_FREE(data);
1732
+ return NPY_FAIL;
1733
+ }
1734
+ }
1735
+
1736
+ if (wrap_transfer_function_one_to_n(stransfer, data,
1737
+ stransfer_finish_src, data_finish_src,
1738
+ dst_dtype->elsize,
1739
+ N,
1740
+ out_stransfer, out_transferdata) != NPY_SUCCEED) {
1741
+ NPY_AUXDATA_FREE(data);
1742
+ NPY_AUXDATA_FREE(data_finish_src);
1743
+ return NPY_FAIL;
1744
+ }
1745
+
1746
+ return NPY_SUCCEED;
1747
+ }
1748
+
1749
+ /**************************** COPY N TO N CONTIGUOUS ************************/
1750
+
1751
+ /* Copies N contiguous elements to N contiguous elements */
1752
+ typedef struct {
1753
+ NpyAuxData base;
1754
+ PyArray_StridedUnaryOp *stransfer;
1755
+ NpyAuxData *data;
1756
+ npy_intp N, src_itemsize, dst_itemsize;
1757
+ } _n_to_n_data;
1758
+
1759
+ /* transfer data free function */
1760
+ static void _n_to_n_data_free(NpyAuxData *data)
1761
+ {
1762
+ _n_to_n_data *d = (_n_to_n_data *)data;
1763
+ NPY_AUXDATA_FREE(d->data);
1764
+ PyArray_free(data);
1765
+ }
1766
+
1767
+ /* transfer data copy function */
1768
+ static NpyAuxData *_n_to_n_data_clone(NpyAuxData *data)
1769
+ {
1770
+ _n_to_n_data *d = (_n_to_n_data *)data;
1771
+ _n_to_n_data *newdata;
1772
+
1773
+ /* Allocate the data, and populate it */
1774
+ newdata = (_n_to_n_data *)PyArray_malloc(sizeof(_n_to_n_data));
1775
+ if (newdata == NULL) {
1776
+ return NULL;
1777
+ }
1778
+ memcpy(newdata, data, sizeof(_n_to_n_data));
1779
+ if (newdata->data != NULL) {
1780
+ newdata->data = NPY_AUXDATA_CLONE(d->data);
1781
+ if (newdata->data == NULL) {
1782
+ PyArray_free(newdata);
1783
+ return NULL;
1784
+ }
1785
+ }
1786
+
1787
+ return (NpyAuxData *)newdata;
1788
+ }
1789
+
1790
+ static void
1791
+ _strided_to_strided_n_to_n(char *dst, npy_intp dst_stride,
1792
+ char *src, npy_intp src_stride,
1793
+ npy_intp N, npy_intp src_itemsize,
1794
+ NpyAuxData *data)
1795
+ {
1796
+ _n_to_n_data *d = (_n_to_n_data *)data;
1797
+ PyArray_StridedUnaryOp *subtransfer = d->stransfer;
1798
+ NpyAuxData *subdata = d->data;
1799
+ npy_intp subN = d->N, src_subitemsize = d->src_itemsize,
1800
+ dst_subitemsize = d->dst_itemsize;
1801
+
1802
+ while (N > 0) {
1803
+ subtransfer(dst, dst_subitemsize,
1804
+ src, src_subitemsize,
1805
+ subN, src_subitemsize,
1806
+ subdata);
1807
+
1808
+ src += src_stride;
1809
+ dst += dst_stride;
1810
+ --N;
1811
+ }
1812
+ }
1813
+
1814
+ static void
1815
+ _contig_to_contig_n_to_n(char *dst, npy_intp NPY_UNUSED(dst_stride),
1816
+ char *src, npy_intp NPY_UNUSED(src_stride),
1817
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
1818
+ NpyAuxData *data)
1819
+ {
1820
+ _n_to_n_data *d = (_n_to_n_data *)data;
1821
+ PyArray_StridedUnaryOp *subtransfer = d->stransfer;
1822
+ NpyAuxData *subdata = d->data;
1823
+ npy_intp subN = d->N, src_subitemsize = d->src_itemsize,
1824
+ dst_subitemsize = d->dst_itemsize;
1825
+
1826
+ subtransfer(dst, dst_subitemsize,
1827
+ src, src_subitemsize,
1828
+ subN*N, src_subitemsize,
1829
+ subdata);
1830
+ }
1831
+
1832
+ /*
1833
+ * Wraps a transfer function to produce one that copies N contiguous elements
1834
+ * of src to N contiguous elements of dst.
1835
+ */
1836
+ static int
1837
+ wrap_transfer_function_n_to_n(
1838
+ PyArray_StridedUnaryOp *stransfer_inner,
1839
+ NpyAuxData *data_inner,
1840
+ npy_intp src_stride, npy_intp dst_stride,
1841
+ npy_intp src_itemsize, npy_intp dst_itemsize,
1842
+ npy_intp N,
1843
+ PyArray_StridedUnaryOp **out_stransfer,
1844
+ NpyAuxData **out_transferdata)
1845
+ {
1846
+ _n_to_n_data *data;
1847
+
1848
+ data = PyArray_malloc(sizeof(_n_to_n_data));
1849
+ if (data == NULL) {
1850
+ PyErr_NoMemory();
1851
+ return NPY_FAIL;
1852
+ }
1853
+
1854
+ data->base.free = &_n_to_n_data_free;
1855
+ data->base.clone = &_n_to_n_data_clone;
1856
+ data->stransfer = stransfer_inner;
1857
+ data->data = data_inner;
1858
+ data->N = N;
1859
+ data->src_itemsize = src_itemsize;
1860
+ data->dst_itemsize = dst_itemsize;
1861
+
1862
+ /*
1863
+ * If the N subarray elements exactly fit in the strides,
1864
+ * then can do a faster contiguous transfer.
1865
+ */
1866
+ if (src_stride == N * src_itemsize &&
1867
+ dst_stride == N * dst_itemsize) {
1868
+ *out_stransfer = &_contig_to_contig_n_to_n;
1869
+ }
1870
+ else {
1871
+ *out_stransfer = &_strided_to_strided_n_to_n;
1872
+ }
1873
+ *out_transferdata = (NpyAuxData *)data;
1874
+
1875
+ return NPY_SUCCEED;
1876
+ }
1877
+
1878
+ static int
1879
+ get_n_to_n_transfer_function(int aligned,
1880
+ npy_intp src_stride, npy_intp dst_stride,
1881
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
1882
+ int move_references,
1883
+ npy_intp N,
1884
+ PyArray_StridedUnaryOp **out_stransfer,
1885
+ NpyAuxData **out_transferdata,
1886
+ int *out_needs_api)
1887
+ {
1888
+ PyArray_StridedUnaryOp *stransfer;
1889
+ NpyAuxData *data;
1890
+
1891
+ /*
1892
+ * src_stride and dst_stride are set to contiguous, because
1893
+ * subarrays are always contiguous.
1894
+ */
1895
+ if (PyArray_GetDTypeTransferFunction(aligned,
1896
+ src_dtype->elsize, dst_dtype->elsize,
1897
+ src_dtype, dst_dtype,
1898
+ move_references,
1899
+ &stransfer, &data,
1900
+ out_needs_api) != NPY_SUCCEED) {
1901
+ return NPY_FAIL;
1902
+ }
1903
+
1904
+ if (wrap_transfer_function_n_to_n(stransfer, data,
1905
+ src_stride, dst_stride,
1906
+ src_dtype->elsize, dst_dtype->elsize,
1907
+ N,
1908
+ out_stransfer,
1909
+ out_transferdata) != NPY_SUCCEED) {
1910
+ NPY_AUXDATA_FREE(data);
1911
+ return NPY_FAIL;
1912
+ }
1913
+
1914
+ return NPY_SUCCEED;
1915
+ }
1916
+
1917
+ /********************** COPY WITH SUBARRAY BROADCAST ************************/
1918
+
1919
+ typedef struct {
1920
+ npy_intp offset, count;
1921
+ } _subarray_broadcast_offsetrun;
1922
+
1923
+ /* Copies element with subarray broadcasting */
1924
+ typedef struct {
1925
+ NpyAuxData base;
1926
+ PyArray_StridedUnaryOp *stransfer;
1927
+ NpyAuxData *data;
1928
+ npy_intp src_N, dst_N, src_itemsize, dst_itemsize;
1929
+ PyArray_StridedUnaryOp *stransfer_decsrcref;
1930
+ NpyAuxData *data_decsrcref;
1931
+ PyArray_StridedUnaryOp *stransfer_decdstref;
1932
+ NpyAuxData *data_decdstref;
1933
+ /* This gets a run-length encoded representation of the transfer */
1934
+ npy_intp run_count;
1935
+ _subarray_broadcast_offsetrun offsetruns;
1936
+ } _subarray_broadcast_data;
1937
+
1938
+ /* transfer data free function */
1939
+ static void _subarray_broadcast_data_free(NpyAuxData *data)
1940
+ {
1941
+ _subarray_broadcast_data *d = (_subarray_broadcast_data *)data;
1942
+ NPY_AUXDATA_FREE(d->data);
1943
+ NPY_AUXDATA_FREE(d->data_decsrcref);
1944
+ NPY_AUXDATA_FREE(d->data_decdstref);
1945
+ PyArray_free(data);
1946
+ }
1947
+
1948
+ /* transfer data copy function */
1949
+ static NpyAuxData *_subarray_broadcast_data_clone( NpyAuxData *data)
1950
+ {
1951
+ _subarray_broadcast_data *d = (_subarray_broadcast_data *)data;
1952
+ _subarray_broadcast_data *newdata;
1953
+ npy_intp run_count = d->run_count, structsize;
1954
+
1955
+ structsize = sizeof(_subarray_broadcast_data) +
1956
+ run_count*sizeof(_subarray_broadcast_offsetrun);
1957
+
1958
+ /* Allocate the data and populate it */
1959
+ newdata = (_subarray_broadcast_data *)PyArray_malloc(structsize);
1960
+ if (newdata == NULL) {
1961
+ return NULL;
1962
+ }
1963
+ memcpy(newdata, data, structsize);
1964
+ if (d->data != NULL) {
1965
+ newdata->data = NPY_AUXDATA_CLONE(d->data);
1966
+ if (newdata->data == NULL) {
1967
+ PyArray_free(newdata);
1968
+ return NULL;
1969
+ }
1970
+ }
1971
+ if (d->data_decsrcref != NULL) {
1972
+ newdata->data_decsrcref = NPY_AUXDATA_CLONE(d->data_decsrcref);
1973
+ if (newdata->data_decsrcref == NULL) {
1974
+ NPY_AUXDATA_FREE(newdata->data);
1975
+ PyArray_free(newdata);
1976
+ return NULL;
1977
+ }
1978
+ }
1979
+ if (d->data_decdstref != NULL) {
1980
+ newdata->data_decdstref = NPY_AUXDATA_CLONE(d->data_decdstref);
1981
+ if (newdata->data_decdstref == NULL) {
1982
+ NPY_AUXDATA_FREE(newdata->data);
1983
+ NPY_AUXDATA_FREE(newdata->data_decsrcref);
1984
+ PyArray_free(newdata);
1985
+ return NULL;
1986
+ }
1987
+ }
1988
+
1989
+ return (NpyAuxData *)newdata;
1990
+ }
1991
+
1992
+ static void
1993
+ _strided_to_strided_subarray_broadcast(char *dst, npy_intp dst_stride,
1994
+ char *src, npy_intp src_stride,
1995
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
1996
+ NpyAuxData *data)
1997
+ {
1998
+ _subarray_broadcast_data *d = (_subarray_broadcast_data *)data;
1999
+ PyArray_StridedUnaryOp *subtransfer = d->stransfer;
2000
+ NpyAuxData *subdata = d->data;
2001
+ npy_intp run, run_count = d->run_count,
2002
+ src_subitemsize = d->src_itemsize,
2003
+ dst_subitemsize = d->dst_itemsize;
2004
+ npy_intp loop_index, offset, count;
2005
+ char *dst_ptr;
2006
+ _subarray_broadcast_offsetrun *offsetruns = &d->offsetruns;
2007
+
2008
+ while (N > 0) {
2009
+ loop_index = 0;
2010
+ for (run = 0; run < run_count; ++run) {
2011
+ offset = offsetruns[run].offset;
2012
+ count = offsetruns[run].count;
2013
+ dst_ptr = dst + loop_index*dst_subitemsize;
2014
+ if (offset != -1) {
2015
+ subtransfer(dst_ptr, dst_subitemsize,
2016
+ src + offset, src_subitemsize,
2017
+ count, src_subitemsize,
2018
+ subdata);
2019
+ }
2020
+ else {
2021
+ memset(dst_ptr, 0, count*dst_subitemsize);
2022
+ }
2023
+ loop_index += count;
2024
+ }
2025
+
2026
+ src += src_stride;
2027
+ dst += dst_stride;
2028
+ --N;
2029
+ }
2030
+ }
2031
+
2032
+
2033
+ static void
2034
+ _strided_to_strided_subarray_broadcast_withrefs(char *dst, npy_intp dst_stride,
2035
+ char *src, npy_intp src_stride,
2036
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
2037
+ NpyAuxData *data)
2038
+ {
2039
+ _subarray_broadcast_data *d = (_subarray_broadcast_data *)data;
2040
+ PyArray_StridedUnaryOp *subtransfer = d->stransfer;
2041
+ NpyAuxData *subdata = d->data;
2042
+ PyArray_StridedUnaryOp *stransfer_decsrcref = d->stransfer_decsrcref;
2043
+ NpyAuxData *data_decsrcref = d->data_decsrcref;
2044
+ PyArray_StridedUnaryOp *stransfer_decdstref = d->stransfer_decdstref;
2045
+ NpyAuxData *data_decdstref = d->data_decdstref;
2046
+ npy_intp run, run_count = d->run_count,
2047
+ src_subitemsize = d->src_itemsize,
2048
+ dst_subitemsize = d->dst_itemsize,
2049
+ src_subN = d->src_N;
2050
+ npy_intp loop_index, offset, count;
2051
+ char *dst_ptr;
2052
+ _subarray_broadcast_offsetrun *offsetruns = &d->offsetruns;
2053
+
2054
+ while (N > 0) {
2055
+ loop_index = 0;
2056
+ for (run = 0; run < run_count; ++run) {
2057
+ offset = offsetruns[run].offset;
2058
+ count = offsetruns[run].count;
2059
+ dst_ptr = dst + loop_index*dst_subitemsize;
2060
+ if (offset != -1) {
2061
+ subtransfer(dst_ptr, dst_subitemsize,
2062
+ src + offset, src_subitemsize,
2063
+ count, src_subitemsize,
2064
+ subdata);
2065
+ }
2066
+ else {
2067
+ if (stransfer_decdstref != NULL) {
2068
+ stransfer_decdstref(NULL, 0, dst_ptr, dst_subitemsize,
2069
+ count, dst_subitemsize,
2070
+ data_decdstref);
2071
+ }
2072
+ memset(dst_ptr, 0, count*dst_subitemsize);
2073
+ }
2074
+ loop_index += count;
2075
+ }
2076
+
2077
+ if (stransfer_decsrcref != NULL) {
2078
+ stransfer_decsrcref(NULL, 0, src, src_subitemsize,
2079
+ src_subN, src_subitemsize,
2080
+ data_decsrcref);
2081
+ }
2082
+
2083
+ src += src_stride;
2084
+ dst += dst_stride;
2085
+ --N;
2086
+ }
2087
+ }
2088
+
2089
+
2090
+ static int
2091
+ get_subarray_broadcast_transfer_function(int aligned,
2092
+ npy_intp src_stride, npy_intp dst_stride,
2093
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
2094
+ npy_intp src_size, npy_intp dst_size,
2095
+ PyArray_Dims src_shape, PyArray_Dims dst_shape,
2096
+ int move_references,
2097
+ PyArray_StridedUnaryOp **out_stransfer,
2098
+ NpyAuxData **out_transferdata,
2099
+ int *out_needs_api)
2100
+ {
2101
+ _subarray_broadcast_data *data;
2102
+ npy_intp structsize, loop_index, run, run_size,
2103
+ src_index, dst_index, i, ndim;
2104
+ _subarray_broadcast_offsetrun *offsetruns;
2105
+
2106
+ structsize = sizeof(_subarray_broadcast_data) +
2107
+ dst_size*sizeof(_subarray_broadcast_offsetrun);
2108
+
2109
+ /* Allocate the data and populate it */
2110
+ data = (_subarray_broadcast_data *)PyArray_malloc(structsize);
2111
+ if (data == NULL) {
2112
+ PyErr_NoMemory();
2113
+ return NPY_FAIL;
2114
+ }
2115
+
2116
+ /*
2117
+ * move_references is set to 0, handled in the wrapping transfer fn,
2118
+ * src_stride and dst_stride are set to contiguous, as N will always
2119
+ * be 1 when it's called.
2120
+ */
2121
+ if (PyArray_GetDTypeTransferFunction(aligned,
2122
+ src_dtype->elsize, dst_dtype->elsize,
2123
+ src_dtype, dst_dtype,
2124
+ 0,
2125
+ &data->stransfer, &data->data,
2126
+ out_needs_api) != NPY_SUCCEED) {
2127
+ PyArray_free(data);
2128
+ return NPY_FAIL;
2129
+ }
2130
+ data->base.free = &_subarray_broadcast_data_free;
2131
+ data->base.clone = &_subarray_broadcast_data_clone;
2132
+ data->src_N = src_size;
2133
+ data->dst_N = dst_size;
2134
+ data->src_itemsize = src_dtype->elsize;
2135
+ data->dst_itemsize = dst_dtype->elsize;
2136
+
2137
+ /* If the src object will need a DECREF */
2138
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
2139
+ if (PyArray_GetDTypeTransferFunction(aligned,
2140
+ src_dtype->elsize, 0,
2141
+ src_dtype, NULL,
2142
+ 1,
2143
+ &data->stransfer_decsrcref,
2144
+ &data->data_decsrcref,
2145
+ out_needs_api) != NPY_SUCCEED) {
2146
+ NPY_AUXDATA_FREE(data->data);
2147
+ PyArray_free(data);
2148
+ return NPY_FAIL;
2149
+ }
2150
+ }
2151
+ else {
2152
+ data->stransfer_decsrcref = NULL;
2153
+ data->data_decsrcref = NULL;
2154
+ }
2155
+
2156
+ /* If the dst object needs a DECREF to set it to NULL */
2157
+ if (PyDataType_REFCHK(dst_dtype)) {
2158
+ if (PyArray_GetDTypeTransferFunction(aligned,
2159
+ dst_dtype->elsize, 0,
2160
+ dst_dtype, NULL,
2161
+ 1,
2162
+ &data->stransfer_decdstref,
2163
+ &data->data_decdstref,
2164
+ out_needs_api) != NPY_SUCCEED) {
2165
+ NPY_AUXDATA_FREE(data->data);
2166
+ NPY_AUXDATA_FREE(data->data_decsrcref);
2167
+ PyArray_free(data);
2168
+ return NPY_FAIL;
2169
+ }
2170
+ }
2171
+ else {
2172
+ data->stransfer_decdstref = NULL;
2173
+ data->data_decdstref = NULL;
2174
+ }
2175
+
2176
+ /* Calculate the broadcasting and set the offsets */
2177
+ offsetruns = &data->offsetruns;
2178
+ ndim = (src_shape.len > dst_shape.len) ? src_shape.len : dst_shape.len;
2179
+ for (loop_index = 0; loop_index < dst_size; ++loop_index) {
2180
+ npy_intp src_factor = 1;
2181
+
2182
+ dst_index = loop_index;
2183
+ src_index = 0;
2184
+ for (i = ndim-1; i >= 0; --i) {
2185
+ npy_intp coord = 0, shape;
2186
+
2187
+ /* Get the dst coord of this index for dimension i */
2188
+ if (i >= ndim - dst_shape.len) {
2189
+ shape = dst_shape.ptr[i-(ndim-dst_shape.len)];
2190
+ coord = dst_index % shape;
2191
+ dst_index /= shape;
2192
+ }
2193
+
2194
+ /* Translate it into a src coord and update src_index */
2195
+ if (i >= ndim - src_shape.len) {
2196
+ shape = src_shape.ptr[i-(ndim-src_shape.len)];
2197
+ if (shape == 1) {
2198
+ coord = 0;
2199
+ }
2200
+ else {
2201
+ if (coord < shape) {
2202
+ src_index += src_factor*coord;
2203
+ src_factor *= shape;
2204
+ }
2205
+ else {
2206
+ /* Out of bounds, flag with -1 */
2207
+ src_index = -1;
2208
+ break;
2209
+ }
2210
+ }
2211
+ }
2212
+ }
2213
+ /* Set the offset */
2214
+ if (src_index == -1) {
2215
+ offsetruns[loop_index].offset = -1;
2216
+ }
2217
+ else {
2218
+ offsetruns[loop_index].offset = src_index;
2219
+ }
2220
+ }
2221
+
2222
+ /* Run-length encode the result */
2223
+ run = 0;
2224
+ run_size = 1;
2225
+ for (loop_index = 1; loop_index < dst_size; ++loop_index) {
2226
+ if (offsetruns[run].offset == -1) {
2227
+ /* Stop the run when there's a valid index again */
2228
+ if (offsetruns[loop_index].offset != -1) {
2229
+ offsetruns[run].count = run_size;
2230
+ run++;
2231
+ run_size = 1;
2232
+ offsetruns[run].offset = offsetruns[loop_index].offset;
2233
+ }
2234
+ else {
2235
+ run_size++;
2236
+ }
2237
+ }
2238
+ else {
2239
+ /* Stop the run when there's a valid index again */
2240
+ if (offsetruns[loop_index].offset !=
2241
+ offsetruns[loop_index-1].offset + 1) {
2242
+ offsetruns[run].count = run_size;
2243
+ run++;
2244
+ run_size = 1;
2245
+ offsetruns[run].offset = offsetruns[loop_index].offset;
2246
+ }
2247
+ else {
2248
+ run_size++;
2249
+ }
2250
+ }
2251
+ }
2252
+ offsetruns[run].count = run_size;
2253
+ run++;
2254
+ data->run_count = run;
2255
+
2256
+ /* Multiply all the offsets by the src item size */
2257
+ while (run--) {
2258
+ if (offsetruns[run].offset != -1) {
2259
+ offsetruns[run].offset *= src_dtype->elsize;
2260
+ }
2261
+ }
2262
+
2263
+ if (data->stransfer_decsrcref == NULL &&
2264
+ data->stransfer_decdstref == NULL) {
2265
+ *out_stransfer = &_strided_to_strided_subarray_broadcast;
2266
+ }
2267
+ else {
2268
+ *out_stransfer = &_strided_to_strided_subarray_broadcast_withrefs;
2269
+ }
2270
+ *out_transferdata = (NpyAuxData *)data;
2271
+
2272
+ return NPY_SUCCEED;
2273
+ }
2274
+
2275
+ /*
2276
+ * Handles subarray transfer. To call this, at least one of the dtype's
2277
+ * subarrays must be non-NULL
2278
+ */
2279
+ static int
2280
+ get_subarray_transfer_function(int aligned,
2281
+ npy_intp src_stride, npy_intp dst_stride,
2282
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
2283
+ int move_references,
2284
+ PyArray_StridedUnaryOp **out_stransfer,
2285
+ NpyAuxData **out_transferdata,
2286
+ int *out_needs_api)
2287
+ {
2288
+ PyArray_Dims src_shape = {NULL, -1}, dst_shape = {NULL, -1};
2289
+ npy_intp src_size = 1, dst_size = 1;
2290
+
2291
+ /* Get the subarray shapes and sizes */
2292
+ if (PyDataType_HASSUBARRAY(src_dtype)) {
2293
+ if (!(PyArray_IntpConverter(src_dtype->subarray->shape,
2294
+ &src_shape))) {
2295
+ PyErr_SetString(PyExc_ValueError,
2296
+ "invalid subarray shape");
2297
+ return NPY_FAIL;
2298
+ }
2299
+ src_size = PyArray_MultiplyList(src_shape.ptr, src_shape.len);
2300
+ src_dtype = src_dtype->subarray->base;
2301
+ }
2302
+ if (PyDataType_HASSUBARRAY(dst_dtype)) {
2303
+ if (!(PyArray_IntpConverter(dst_dtype->subarray->shape,
2304
+ &dst_shape))) {
2305
+ PyDimMem_FREE(src_shape.ptr);
2306
+ PyErr_SetString(PyExc_ValueError,
2307
+ "invalid subarray shape");
2308
+ return NPY_FAIL;
2309
+ }
2310
+ dst_size = PyArray_MultiplyList(dst_shape.ptr, dst_shape.len);
2311
+ dst_dtype = dst_dtype->subarray->base;
2312
+ }
2313
+
2314
+ /*
2315
+ * Just a straight one-element copy.
2316
+ */
2317
+ if (dst_size == 1 && src_size == 1) {
2318
+ PyDimMem_FREE(src_shape.ptr);
2319
+ PyDimMem_FREE(dst_shape.ptr);
2320
+
2321
+ return PyArray_GetDTypeTransferFunction(aligned,
2322
+ src_stride, dst_stride,
2323
+ src_dtype, dst_dtype,
2324
+ move_references,
2325
+ out_stransfer, out_transferdata,
2326
+ out_needs_api);
2327
+ }
2328
+ /* Copy the src value to all the dst values */
2329
+ else if (src_size == 1) {
2330
+ PyDimMem_FREE(src_shape.ptr);
2331
+ PyDimMem_FREE(dst_shape.ptr);
2332
+
2333
+ return get_one_to_n_transfer_function(aligned,
2334
+ src_stride, dst_stride,
2335
+ src_dtype, dst_dtype,
2336
+ move_references,
2337
+ dst_size,
2338
+ out_stransfer, out_transferdata,
2339
+ out_needs_api);
2340
+ }
2341
+ /* If the shapes match exactly, do an n to n copy */
2342
+ else if (src_shape.len == dst_shape.len &&
2343
+ PyArray_CompareLists(src_shape.ptr, dst_shape.ptr,
2344
+ src_shape.len)) {
2345
+ PyDimMem_FREE(src_shape.ptr);
2346
+ PyDimMem_FREE(dst_shape.ptr);
2347
+
2348
+ return get_n_to_n_transfer_function(aligned,
2349
+ src_stride, dst_stride,
2350
+ src_dtype, dst_dtype,
2351
+ move_references,
2352
+ src_size,
2353
+ out_stransfer, out_transferdata,
2354
+ out_needs_api);
2355
+ }
2356
+ /*
2357
+ * Copy the subarray with broadcasting, truncating, and zero-padding
2358
+ * as necessary.
2359
+ */
2360
+ else {
2361
+ int ret = get_subarray_broadcast_transfer_function(aligned,
2362
+ src_stride, dst_stride,
2363
+ src_dtype, dst_dtype,
2364
+ src_size, dst_size,
2365
+ src_shape, dst_shape,
2366
+ move_references,
2367
+ out_stransfer, out_transferdata,
2368
+ out_needs_api);
2369
+
2370
+ PyDimMem_FREE(src_shape.ptr);
2371
+ PyDimMem_FREE(dst_shape.ptr);
2372
+ return ret;
2373
+ }
2374
+ }
2375
+
2376
+ /**************************** COPY FIELDS *******************************/
2377
+ typedef struct {
2378
+ npy_intp src_offset, dst_offset, src_itemsize;
2379
+ PyArray_StridedUnaryOp *stransfer;
2380
+ NpyAuxData *data;
2381
+ } _single_field_transfer;
2382
+
2383
+ typedef struct {
2384
+ NpyAuxData base;
2385
+ npy_intp field_count;
2386
+
2387
+ _single_field_transfer fields;
2388
+ } _field_transfer_data;
2389
+
2390
+ /* transfer data free function */
2391
+ static void _field_transfer_data_free(NpyAuxData *data)
2392
+ {
2393
+ _field_transfer_data *d = (_field_transfer_data *)data;
2394
+ npy_intp i, field_count;
2395
+ _single_field_transfer *fields;
2396
+
2397
+ field_count = d->field_count;
2398
+ fields = &d->fields;
2399
+
2400
+ for (i = 0; i < field_count; ++i) {
2401
+ NPY_AUXDATA_FREE(fields[i].data);
2402
+ }
2403
+ PyArray_free(d);
2404
+ }
2405
+
2406
+ /* transfer data copy function */
2407
+ static NpyAuxData *_field_transfer_data_clone(NpyAuxData *data)
2408
+ {
2409
+ _field_transfer_data *d = (_field_transfer_data *)data;
2410
+ _field_transfer_data *newdata;
2411
+ npy_intp i, field_count = d->field_count, structsize;
2412
+ _single_field_transfer *fields, *newfields;
2413
+
2414
+ structsize = sizeof(_field_transfer_data) +
2415
+ field_count * sizeof(_single_field_transfer);
2416
+
2417
+ /* Allocate the data and populate it */
2418
+ newdata = (_field_transfer_data *)PyArray_malloc(structsize);
2419
+ if (newdata == NULL) {
2420
+ return NULL;
2421
+ }
2422
+ memcpy(newdata, d, structsize);
2423
+ /* Copy all the fields transfer data */
2424
+ fields = &d->fields;
2425
+ newfields = &newdata->fields;
2426
+ for (i = 0; i < field_count; ++i) {
2427
+ if (fields[i].data != NULL) {
2428
+ newfields[i].data = NPY_AUXDATA_CLONE(fields[i].data);
2429
+ if (newfields[i].data == NULL) {
2430
+ for (i = i-1; i >= 0; --i) {
2431
+ NPY_AUXDATA_FREE(newfields[i].data);
2432
+ }
2433
+ PyArray_free(newdata);
2434
+ return NULL;
2435
+ }
2436
+ }
2437
+
2438
+ }
2439
+
2440
+ return (NpyAuxData *)newdata;
2441
+ }
2442
+
2443
+ static void
2444
+ _strided_to_strided_field_transfer(char *dst, npy_intp dst_stride,
2445
+ char *src, npy_intp src_stride,
2446
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
2447
+ NpyAuxData *data)
2448
+ {
2449
+ _field_transfer_data *d = (_field_transfer_data *)data;
2450
+ npy_intp i, field_count = d->field_count;
2451
+ _single_field_transfer *field;
2452
+
2453
+ /* Do the transfer a block at a time */
2454
+ for (;;) {
2455
+ field = &d->fields;
2456
+ if (N > NPY_LOWLEVEL_BUFFER_BLOCKSIZE) {
2457
+ for (i = 0; i < field_count; ++i, ++field) {
2458
+ field->stransfer(dst + field->dst_offset, dst_stride,
2459
+ src + field->src_offset, src_stride,
2460
+ NPY_LOWLEVEL_BUFFER_BLOCKSIZE,
2461
+ field->src_itemsize,
2462
+ field->data);
2463
+ }
2464
+ N -= NPY_LOWLEVEL_BUFFER_BLOCKSIZE;
2465
+ src += NPY_LOWLEVEL_BUFFER_BLOCKSIZE*src_stride;
2466
+ dst += NPY_LOWLEVEL_BUFFER_BLOCKSIZE*dst_stride;
2467
+ }
2468
+ else {
2469
+ for (i = 0; i < field_count; ++i, ++field) {
2470
+ field->stransfer(dst + field->dst_offset, dst_stride,
2471
+ src + field->src_offset, src_stride,
2472
+ N,
2473
+ field->src_itemsize,
2474
+ field->data);
2475
+ }
2476
+ return;
2477
+ }
2478
+ }
2479
+ }
2480
+
2481
+ /*
2482
+ * Handles fields transfer. To call this, at least one of the dtypes
2483
+ * must have fields
2484
+ */
2485
+ static int
2486
+ get_fields_transfer_function(int aligned,
2487
+ npy_intp src_stride, npy_intp dst_stride,
2488
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
2489
+ int move_references,
2490
+ PyArray_StridedUnaryOp **out_stransfer,
2491
+ NpyAuxData **out_transferdata,
2492
+ int *out_needs_api)
2493
+ {
2494
+ PyObject *names, *key, *tup, *title;
2495
+ PyArray_Descr *src_fld_dtype, *dst_fld_dtype;
2496
+ npy_int i, names_size, field_count, structsize;
2497
+ int src_offset, dst_offset;
2498
+ _field_transfer_data *data;
2499
+ _single_field_transfer *fields;
2500
+
2501
+ /* Copy the src value to all the fields of dst */
2502
+ if (!PyDataType_HASFIELDS(src_dtype)) {
2503
+ names = dst_dtype->names;
2504
+ names_size = PyTuple_GET_SIZE(dst_dtype->names);
2505
+
2506
+ field_count = names_size;
2507
+ structsize = sizeof(_field_transfer_data) +
2508
+ (field_count + 1) * sizeof(_single_field_transfer);
2509
+ /* Allocate the data and populate it */
2510
+ data = (_field_transfer_data *)PyArray_malloc(structsize);
2511
+ if (data == NULL) {
2512
+ PyErr_NoMemory();
2513
+ return NPY_FAIL;
2514
+ }
2515
+ data->base.free = &_field_transfer_data_free;
2516
+ data->base.clone = &_field_transfer_data_clone;
2517
+ fields = &data->fields;
2518
+
2519
+ for (i = 0; i < names_size; ++i) {
2520
+ key = PyTuple_GET_ITEM(names, i);
2521
+ tup = PyDict_GetItem(dst_dtype->fields, key);
2522
+ if (!PyArg_ParseTuple(tup, "Oi|O", &dst_fld_dtype,
2523
+ &dst_offset, &title)) {
2524
+ PyArray_free(data);
2525
+ return NPY_FAIL;
2526
+ }
2527
+ if (PyArray_GetDTypeTransferFunction(0,
2528
+ src_stride, dst_stride,
2529
+ src_dtype, dst_fld_dtype,
2530
+ 0,
2531
+ &fields[i].stransfer,
2532
+ &fields[i].data,
2533
+ out_needs_api) != NPY_SUCCEED) {
2534
+ for (i = i-1; i >= 0; --i) {
2535
+ NPY_AUXDATA_FREE(fields[i].data);
2536
+ }
2537
+ PyArray_free(data);
2538
+ return NPY_FAIL;
2539
+ }
2540
+ fields[i].src_offset = 0;
2541
+ fields[i].dst_offset = dst_offset;
2542
+ fields[i].src_itemsize = src_dtype->elsize;
2543
+ }
2544
+
2545
+ /*
2546
+ * If the references should be removed from src, add
2547
+ * another transfer function to do that.
2548
+ */
2549
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
2550
+ if (get_decsrcref_transfer_function(0,
2551
+ src_stride,
2552
+ src_dtype,
2553
+ &fields[field_count].stransfer,
2554
+ &fields[field_count].data,
2555
+ out_needs_api) != NPY_SUCCEED) {
2556
+ for (i = 0; i < field_count; ++i) {
2557
+ NPY_AUXDATA_FREE(fields[i].data);
2558
+ }
2559
+ PyArray_free(data);
2560
+ return NPY_FAIL;
2561
+ }
2562
+ fields[field_count].src_offset = 0;
2563
+ fields[field_count].dst_offset = 0;
2564
+ fields[field_count].src_itemsize = src_dtype->elsize;
2565
+ field_count++;
2566
+ }
2567
+ data->field_count = field_count;
2568
+
2569
+ *out_stransfer = &_strided_to_strided_field_transfer;
2570
+ *out_transferdata = (NpyAuxData *)data;
2571
+
2572
+ return NPY_SUCCEED;
2573
+ }
2574
+ /* Copy the value of the first field to dst */
2575
+ else if (!PyDataType_HASFIELDS(dst_dtype)) {
2576
+ names = src_dtype->names;
2577
+ names_size = PyTuple_GET_SIZE(src_dtype->names);
2578
+
2579
+ /*
2580
+ * If DECREF is needed on source fields, may need
2581
+ * to process all the fields
2582
+ */
2583
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
2584
+ field_count = names_size + 1;
2585
+ }
2586
+ else {
2587
+ field_count = 1;
2588
+ }
2589
+ structsize = sizeof(_field_transfer_data) +
2590
+ field_count * sizeof(_single_field_transfer);
2591
+ /* Allocate the data and populate it */
2592
+ data = (_field_transfer_data *)PyArray_malloc(structsize);
2593
+ if (data == NULL) {
2594
+ PyErr_NoMemory();
2595
+ return NPY_FAIL;
2596
+ }
2597
+ data->base.free = &_field_transfer_data_free;
2598
+ data->base.clone = &_field_transfer_data_clone;
2599
+ fields = &data->fields;
2600
+
2601
+ key = PyTuple_GET_ITEM(names, 0);
2602
+ tup = PyDict_GetItem(src_dtype->fields, key);
2603
+ if (!PyArg_ParseTuple(tup, "Oi|O", &src_fld_dtype,
2604
+ &src_offset, &title)) {
2605
+ PyArray_free(data);
2606
+ return NPY_FAIL;
2607
+ }
2608
+ field_count = 0;
2609
+ /*
2610
+ * Special case bool type, the existence of fields implies True
2611
+ *
2612
+ * TODO: Perhaps a better behavior would be to combine all the
2613
+ * input fields with an OR? The same would apply to subarrays.
2614
+ */
2615
+ if (dst_dtype->type_num == NPY_BOOL) {
2616
+ if (get_bool_setdstone_transfer_function(dst_stride,
2617
+ &fields[field_count].stransfer,
2618
+ &fields[field_count].data,
2619
+ out_needs_api) != NPY_SUCCEED) {
2620
+ PyArray_free(data);
2621
+ return NPY_FAIL;
2622
+ }
2623
+ fields[field_count].src_offset = 0;
2624
+ fields[field_count].dst_offset = 0;
2625
+ fields[field_count].src_itemsize = 0;
2626
+ field_count++;
2627
+
2628
+ /* If the src field has references, may need to clear them */
2629
+ if (move_references && PyDataType_REFCHK(src_fld_dtype)) {
2630
+ if (get_decsrcref_transfer_function(0,
2631
+ src_stride,
2632
+ src_fld_dtype,
2633
+ &fields[field_count].stransfer,
2634
+ &fields[field_count].data,
2635
+ out_needs_api) != NPY_SUCCEED) {
2636
+ NPY_AUXDATA_FREE(fields[0].data);
2637
+ PyArray_free(data);
2638
+ return NPY_FAIL;
2639
+ }
2640
+ fields[field_count].src_offset = src_offset;
2641
+ fields[field_count].dst_offset = 0;
2642
+ fields[field_count].src_itemsize = src_fld_dtype->elsize;
2643
+ field_count++;
2644
+ }
2645
+ }
2646
+ /* Transfer the first field to the output */
2647
+ else {
2648
+ if (PyArray_GetDTypeTransferFunction(0,
2649
+ src_stride, dst_stride,
2650
+ src_fld_dtype, dst_dtype,
2651
+ move_references,
2652
+ &fields[field_count].stransfer,
2653
+ &fields[field_count].data,
2654
+ out_needs_api) != NPY_SUCCEED) {
2655
+ PyArray_free(data);
2656
+ return NPY_FAIL;
2657
+ }
2658
+ fields[field_count].src_offset = src_offset;
2659
+ fields[field_count].dst_offset = 0;
2660
+ fields[field_count].src_itemsize = src_fld_dtype->elsize;
2661
+ field_count++;
2662
+ }
2663
+
2664
+ /*
2665
+ * If the references should be removed from src, add
2666
+ * more transfer functions to decrement the references
2667
+ * for all the other fields.
2668
+ */
2669
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
2670
+ for (i = 1; i < names_size; ++i) {
2671
+ key = PyTuple_GET_ITEM(names, i);
2672
+ tup = PyDict_GetItem(src_dtype->fields, key);
2673
+ if (!PyArg_ParseTuple(tup, "Oi|O", &src_fld_dtype,
2674
+ &src_offset, &title)) {
2675
+ return NPY_FAIL;
2676
+ }
2677
+ if (PyDataType_REFCHK(src_fld_dtype)) {
2678
+ if (get_decsrcref_transfer_function(0,
2679
+ src_stride,
2680
+ src_fld_dtype,
2681
+ &fields[field_count].stransfer,
2682
+ &fields[field_count].data,
2683
+ out_needs_api) != NPY_SUCCEED) {
2684
+ for (i = field_count-1; i >= 0; --i) {
2685
+ NPY_AUXDATA_FREE(fields[i].data);
2686
+ }
2687
+ PyArray_free(data);
2688
+ return NPY_FAIL;
2689
+ }
2690
+ fields[field_count].src_offset = src_offset;
2691
+ fields[field_count].dst_offset = 0;
2692
+ fields[field_count].src_itemsize = src_fld_dtype->elsize;
2693
+ field_count++;
2694
+ }
2695
+ }
2696
+ }
2697
+
2698
+ data->field_count = field_count;
2699
+
2700
+ *out_stransfer = &_strided_to_strided_field_transfer;
2701
+ *out_transferdata = (NpyAuxData *)data;
2702
+
2703
+ return NPY_SUCCEED;
2704
+ }
2705
+ /* Match up the fields to copy */
2706
+ else {
2707
+ /* Keeps track of the names we already used */
2708
+ PyObject *used_names_dict = NULL;
2709
+
2710
+ names = dst_dtype->names;
2711
+ names_size = PyTuple_GET_SIZE(dst_dtype->names);
2712
+
2713
+ /*
2714
+ * If DECREF is needed on source fields, will need
2715
+ * to also go through its fields.
2716
+ */
2717
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
2718
+ field_count = names_size + PyTuple_GET_SIZE(src_dtype->names);
2719
+ used_names_dict = PyDict_New();
2720
+ if (used_names_dict == NULL) {
2721
+ return NPY_FAIL;
2722
+ }
2723
+ }
2724
+ else {
2725
+ field_count = names_size;
2726
+ }
2727
+ structsize = sizeof(_field_transfer_data) +
2728
+ field_count * sizeof(_single_field_transfer);
2729
+ /* Allocate the data and populate it */
2730
+ data = (_field_transfer_data *)PyArray_malloc(structsize);
2731
+ if (data == NULL) {
2732
+ PyErr_NoMemory();
2733
+ Py_XDECREF(used_names_dict);
2734
+ return NPY_FAIL;
2735
+ }
2736
+ data->base.free = &_field_transfer_data_free;
2737
+ data->base.clone = &_field_transfer_data_clone;
2738
+ fields = &data->fields;
2739
+
2740
+ for (i = 0; i < names_size; ++i) {
2741
+ key = PyTuple_GET_ITEM(names, i);
2742
+ tup = PyDict_GetItem(dst_dtype->fields, key);
2743
+ if (!PyArg_ParseTuple(tup, "Oi|O", &dst_fld_dtype,
2744
+ &dst_offset, &title)) {
2745
+ for (i = i-1; i >= 0; --i) {
2746
+ NPY_AUXDATA_FREE(fields[i].data);
2747
+ }
2748
+ PyArray_free(data);
2749
+ Py_XDECREF(used_names_dict);
2750
+ return NPY_FAIL;
2751
+ }
2752
+ tup = PyDict_GetItem(src_dtype->fields, key);
2753
+ if (tup != NULL) {
2754
+ if (!PyArg_ParseTuple(tup, "Oi|O", &src_fld_dtype,
2755
+ &src_offset, &title)) {
2756
+ for (i = i-1; i >= 0; --i) {
2757
+ NPY_AUXDATA_FREE(fields[i].data);
2758
+ }
2759
+ PyArray_free(data);
2760
+ Py_XDECREF(used_names_dict);
2761
+ return NPY_FAIL;
2762
+ }
2763
+ if (PyArray_GetDTypeTransferFunction(0,
2764
+ src_stride, dst_stride,
2765
+ src_fld_dtype, dst_fld_dtype,
2766
+ move_references,
2767
+ &fields[i].stransfer,
2768
+ &fields[i].data,
2769
+ out_needs_api) != NPY_SUCCEED) {
2770
+ for (i = i-1; i >= 0; --i) {
2771
+ NPY_AUXDATA_FREE(fields[i].data);
2772
+ }
2773
+ PyArray_free(data);
2774
+ Py_XDECREF(used_names_dict);
2775
+ return NPY_FAIL;
2776
+ }
2777
+ fields[i].src_offset = src_offset;
2778
+ fields[i].dst_offset = dst_offset;
2779
+ fields[i].src_itemsize = src_fld_dtype->elsize;
2780
+
2781
+ if (used_names_dict != NULL) {
2782
+ PyDict_SetItem(used_names_dict, key, Py_True);
2783
+ }
2784
+ }
2785
+ else {
2786
+ if (get_setdstzero_transfer_function(0,
2787
+ dst_stride,
2788
+ dst_fld_dtype,
2789
+ &fields[i].stransfer,
2790
+ &fields[i].data,
2791
+ out_needs_api) != NPY_SUCCEED) {
2792
+ for (i = i-1; i >= 0; --i) {
2793
+ NPY_AUXDATA_FREE(fields[i].data);
2794
+ }
2795
+ PyArray_free(data);
2796
+ Py_XDECREF(used_names_dict);
2797
+ return NPY_FAIL;
2798
+ }
2799
+ fields[i].src_offset = 0;
2800
+ fields[i].dst_offset = dst_offset;
2801
+ fields[i].src_itemsize = 0;
2802
+ }
2803
+ }
2804
+
2805
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
2806
+ /* Use field_count to track additional functions added */
2807
+ field_count = names_size;
2808
+
2809
+ names = src_dtype->names;
2810
+ names_size = PyTuple_GET_SIZE(src_dtype->names);
2811
+ for (i = 0; i < names_size; ++i) {
2812
+ key = PyTuple_GET_ITEM(names, i);
2813
+ if (PyDict_GetItem(used_names_dict, key) == NULL) {
2814
+ tup = PyDict_GetItem(src_dtype->fields, key);
2815
+ if (!PyArg_ParseTuple(tup, "Oi|O", &src_fld_dtype,
2816
+ &src_offset, &title)) {
2817
+ for (i = field_count-1; i >= 0; --i) {
2818
+ NPY_AUXDATA_FREE(fields[i].data);
2819
+ }
2820
+ PyArray_free(data);
2821
+ Py_XDECREF(used_names_dict);
2822
+ return NPY_FAIL;
2823
+ }
2824
+ if (PyDataType_REFCHK(src_fld_dtype)) {
2825
+ if (get_decsrcref_transfer_function(0,
2826
+ src_stride,
2827
+ src_fld_dtype,
2828
+ &fields[field_count].stransfer,
2829
+ &fields[field_count].data,
2830
+ out_needs_api) != NPY_SUCCEED) {
2831
+ for (i = field_count-1; i >= 0; --i) {
2832
+ NPY_AUXDATA_FREE(fields[i].data);
2833
+ }
2834
+ PyArray_free(data);
2835
+ return NPY_FAIL;
2836
+ }
2837
+ fields[field_count].src_offset = src_offset;
2838
+ fields[field_count].dst_offset = 0;
2839
+ fields[field_count].src_itemsize =
2840
+ src_fld_dtype->elsize;
2841
+ field_count++;
2842
+ }
2843
+ }
2844
+ }
2845
+ }
2846
+
2847
+ Py_XDECREF(used_names_dict);
2848
+
2849
+ data->field_count = field_count;
2850
+
2851
+ *out_stransfer = &_strided_to_strided_field_transfer;
2852
+ *out_transferdata = (NpyAuxData *)data;
2853
+
2854
+ return NPY_SUCCEED;
2855
+ }
2856
+ }
2857
+
2858
+ static int
2859
+ get_decsrcref_fields_transfer_function(int aligned,
2860
+ npy_intp src_stride,
2861
+ PyArray_Descr *src_dtype,
2862
+ PyArray_StridedUnaryOp **out_stransfer,
2863
+ NpyAuxData **out_transferdata,
2864
+ int *out_needs_api)
2865
+ {
2866
+ PyObject *names, *key, *tup, *title;
2867
+ PyArray_Descr *src_fld_dtype;
2868
+ npy_int i, names_size, field_count, structsize;
2869
+ int src_offset;
2870
+ _field_transfer_data *data;
2871
+ _single_field_transfer *fields;
2872
+
2873
+ names = src_dtype->names;
2874
+ names_size = PyTuple_GET_SIZE(src_dtype->names);
2875
+
2876
+ field_count = names_size;
2877
+ structsize = sizeof(_field_transfer_data) +
2878
+ field_count * sizeof(_single_field_transfer);
2879
+ /* Allocate the data and populate it */
2880
+ data = (_field_transfer_data *)PyArray_malloc(structsize);
2881
+ if (data == NULL) {
2882
+ PyErr_NoMemory();
2883
+ return NPY_FAIL;
2884
+ }
2885
+ data->base.free = &_field_transfer_data_free;
2886
+ data->base.clone = &_field_transfer_data_clone;
2887
+ fields = &data->fields;
2888
+
2889
+ field_count = 0;
2890
+ for (i = 0; i < names_size; ++i) {
2891
+ key = PyTuple_GET_ITEM(names, i);
2892
+ tup = PyDict_GetItem(src_dtype->fields, key);
2893
+ if (!PyArg_ParseTuple(tup, "Oi|O", &src_fld_dtype,
2894
+ &src_offset, &title)) {
2895
+ PyArray_free(data);
2896
+ return NPY_FAIL;
2897
+ }
2898
+ if (PyDataType_REFCHK(src_fld_dtype)) {
2899
+ if (out_needs_api) {
2900
+ *out_needs_api = 1;
2901
+ }
2902
+ if (get_decsrcref_transfer_function(0,
2903
+ src_stride,
2904
+ src_fld_dtype,
2905
+ &fields[field_count].stransfer,
2906
+ &fields[field_count].data,
2907
+ out_needs_api) != NPY_SUCCEED) {
2908
+ for (i = field_count-1; i >= 0; --i) {
2909
+ NPY_AUXDATA_FREE(fields[i].data);
2910
+ }
2911
+ PyArray_free(data);
2912
+ return NPY_FAIL;
2913
+ }
2914
+ fields[field_count].src_offset = src_offset;
2915
+ fields[field_count].dst_offset = 0;
2916
+ fields[field_count].src_itemsize = src_dtype->elsize;
2917
+ field_count++;
2918
+ }
2919
+ }
2920
+
2921
+ data->field_count = field_count;
2922
+
2923
+ *out_stransfer = &_strided_to_strided_field_transfer;
2924
+ *out_transferdata = (NpyAuxData *)data;
2925
+
2926
+ return NPY_SUCCEED;
2927
+ }
2928
+
2929
+ static int
2930
+ get_setdestzero_fields_transfer_function(int aligned,
2931
+ npy_intp dst_stride,
2932
+ PyArray_Descr *dst_dtype,
2933
+ PyArray_StridedUnaryOp **out_stransfer,
2934
+ NpyAuxData **out_transferdata,
2935
+ int *out_needs_api)
2936
+ {
2937
+ PyObject *names, *key, *tup, *title;
2938
+ PyArray_Descr *dst_fld_dtype;
2939
+ npy_int i, names_size, field_count, structsize;
2940
+ int dst_offset;
2941
+ _field_transfer_data *data;
2942
+ _single_field_transfer *fields;
2943
+
2944
+ names = dst_dtype->names;
2945
+ names_size = PyTuple_GET_SIZE(dst_dtype->names);
2946
+
2947
+ field_count = names_size;
2948
+ structsize = sizeof(_field_transfer_data) +
2949
+ field_count * sizeof(_single_field_transfer);
2950
+ /* Allocate the data and populate it */
2951
+ data = (_field_transfer_data *)PyArray_malloc(structsize);
2952
+ if (data == NULL) {
2953
+ PyErr_NoMemory();
2954
+ return NPY_FAIL;
2955
+ }
2956
+ data->base.free = &_field_transfer_data_free;
2957
+ data->base.clone = &_field_transfer_data_clone;
2958
+ fields = &data->fields;
2959
+
2960
+ for (i = 0; i < names_size; ++i) {
2961
+ key = PyTuple_GET_ITEM(names, i);
2962
+ tup = PyDict_GetItem(dst_dtype->fields, key);
2963
+ if (!PyArg_ParseTuple(tup, "Oi|O", &dst_fld_dtype,
2964
+ &dst_offset, &title)) {
2965
+ PyArray_free(data);
2966
+ return NPY_FAIL;
2967
+ }
2968
+ if (get_setdstzero_transfer_function(0,
2969
+ dst_stride,
2970
+ dst_fld_dtype,
2971
+ &fields[i].stransfer,
2972
+ &fields[i].data,
2973
+ out_needs_api) != NPY_SUCCEED) {
2974
+ for (i = i-1; i >= 0; --i) {
2975
+ NPY_AUXDATA_FREE(fields[i].data);
2976
+ }
2977
+ PyArray_free(data);
2978
+ return NPY_FAIL;
2979
+ }
2980
+ fields[i].src_offset = 0;
2981
+ fields[i].dst_offset = dst_offset;
2982
+ fields[i].src_itemsize = 0;
2983
+ }
2984
+
2985
+ data->field_count = field_count;
2986
+
2987
+ *out_stransfer = &_strided_to_strided_field_transfer;
2988
+ *out_transferdata = (NpyAuxData *)data;
2989
+
2990
+ return NPY_SUCCEED;
2991
+ }
2992
+
2993
+ /************************* MASKED TRANSFER WRAPPER *************************/
2994
+
2995
+ typedef struct {
2996
+ NpyAuxData base;
2997
+ /* The transfer function being wrapped */
2998
+ PyArray_StridedUnaryOp *stransfer;
2999
+ NpyAuxData *transferdata;
3000
+
3001
+ /* The src decref function if necessary */
3002
+ PyArray_StridedUnaryOp *decsrcref_stransfer;
3003
+ NpyAuxData *decsrcref_transferdata;
3004
+ } _masked_wrapper_transfer_data;
3005
+
3006
+ /* transfer data free function */
3007
+ static void _masked_wrapper_transfer_data_free(NpyAuxData *data)
3008
+ {
3009
+ _masked_wrapper_transfer_data *d = (_masked_wrapper_transfer_data *)data;
3010
+ NPY_AUXDATA_FREE(d->transferdata);
3011
+ NPY_AUXDATA_FREE(d->decsrcref_transferdata);
3012
+ PyArray_free(data);
3013
+ }
3014
+
3015
+ /* transfer data copy function */
3016
+ static NpyAuxData *_masked_wrapper_transfer_data_clone(NpyAuxData *data)
3017
+ {
3018
+ _masked_wrapper_transfer_data *d = (_masked_wrapper_transfer_data *)data;
3019
+ _masked_wrapper_transfer_data *newdata;
3020
+
3021
+ /* Allocate the data and populate it */
3022
+ newdata = (_masked_wrapper_transfer_data *)PyArray_malloc(
3023
+ sizeof(_masked_wrapper_transfer_data));
3024
+ if (newdata == NULL) {
3025
+ return NULL;
3026
+ }
3027
+ memcpy(newdata, d, sizeof(_masked_wrapper_transfer_data));
3028
+
3029
+ /* Clone all the owned auxdata as well */
3030
+ if (newdata->transferdata != NULL) {
3031
+ newdata->transferdata = NPY_AUXDATA_CLONE(newdata->transferdata);
3032
+ if (newdata->transferdata == NULL) {
3033
+ PyArray_free(newdata);
3034
+ return NULL;
3035
+ }
3036
+ }
3037
+ if (newdata->decsrcref_transferdata != NULL) {
3038
+ newdata->decsrcref_transferdata =
3039
+ NPY_AUXDATA_CLONE(newdata->decsrcref_transferdata);
3040
+ if (newdata->decsrcref_transferdata == NULL) {
3041
+ NPY_AUXDATA_FREE(newdata->transferdata);
3042
+ PyArray_free(newdata);
3043
+ return NULL;
3044
+ }
3045
+ }
3046
+
3047
+ return (NpyAuxData *)newdata;
3048
+ }
3049
+
3050
+ static void _strided_masked_wrapper_decsrcref_transfer_function(
3051
+ char *dst, npy_intp dst_stride,
3052
+ char *src, npy_intp src_stride,
3053
+ npy_bool *mask, npy_intp mask_stride,
3054
+ npy_intp N, npy_intp src_itemsize,
3055
+ NpyAuxData *transferdata)
3056
+ {
3057
+ _masked_wrapper_transfer_data *d =
3058
+ (_masked_wrapper_transfer_data *)transferdata;
3059
+ npy_intp subloopsize;
3060
+ PyArray_StridedUnaryOp *unmasked_stransfer, *decsrcref_stransfer;
3061
+ NpyAuxData *unmasked_transferdata, *decsrcref_transferdata;
3062
+
3063
+ unmasked_stransfer = d->stransfer;
3064
+ unmasked_transferdata = d->transferdata;
3065
+ decsrcref_stransfer = d->decsrcref_stransfer;
3066
+ decsrcref_transferdata = d->decsrcref_transferdata;
3067
+
3068
+ while (N > 0) {
3069
+ /* Skip masked values, still calling decsrcref for move_references */
3070
+ mask = (npy_bool*)npy_memchr((char *)mask, 0, mask_stride, N,
3071
+ &subloopsize, 1);
3072
+ decsrcref_stransfer(NULL, 0, src, src_stride,
3073
+ subloopsize, src_itemsize, decsrcref_transferdata);
3074
+ dst += subloopsize * dst_stride;
3075
+ src += subloopsize * src_stride;
3076
+ N -= subloopsize;
3077
+ /* Process unmasked values */
3078
+ mask = (npy_bool*)npy_memchr((char *)mask, 0, mask_stride, N,
3079
+ &subloopsize, 0);
3080
+ unmasked_stransfer(dst, dst_stride, src, src_stride,
3081
+ subloopsize, src_itemsize, unmasked_transferdata);
3082
+ dst += subloopsize * dst_stride;
3083
+ src += subloopsize * src_stride;
3084
+ N -= subloopsize;
3085
+ }
3086
+ }
3087
+
3088
+ static void _strided_masked_wrapper_transfer_function(
3089
+ char *dst, npy_intp dst_stride,
3090
+ char *src, npy_intp src_stride,
3091
+ npy_bool *mask, npy_intp mask_stride,
3092
+ npy_intp N, npy_intp src_itemsize,
3093
+ NpyAuxData *transferdata)
3094
+ {
3095
+
3096
+ _masked_wrapper_transfer_data *d =
3097
+ (_masked_wrapper_transfer_data *)transferdata;
3098
+ npy_intp subloopsize;
3099
+ PyArray_StridedUnaryOp *unmasked_stransfer;
3100
+ NpyAuxData *unmasked_transferdata;
3101
+
3102
+ unmasked_stransfer = d->stransfer;
3103
+ unmasked_transferdata = d->transferdata;
3104
+
3105
+ while (N > 0) {
3106
+ /* Skip masked values */
3107
+ mask = (npy_bool*)npy_memchr((char *)mask, 0, mask_stride, N,
3108
+ &subloopsize, 1);
3109
+ dst += subloopsize * dst_stride;
3110
+ src += subloopsize * src_stride;
3111
+ N -= subloopsize;
3112
+ /* Process unmasked values */
3113
+ mask = (npy_bool*)npy_memchr((char *)mask, 0, mask_stride, N,
3114
+ &subloopsize, 0);
3115
+ unmasked_stransfer(dst, dst_stride, src, src_stride,
3116
+ subloopsize, src_itemsize, unmasked_transferdata);
3117
+ dst += subloopsize * dst_stride;
3118
+ src += subloopsize * src_stride;
3119
+ N -= subloopsize;
3120
+ }
3121
+ }
3122
+
3123
+
3124
+ /************************* DEST BOOL SETONE *******************************/
3125
+
3126
+ static void
3127
+ _null_to_strided_set_bool_one(char *dst,
3128
+ npy_intp dst_stride,
3129
+ char *NPY_UNUSED(src), npy_intp NPY_UNUSED(src_stride),
3130
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
3131
+ NpyAuxData *NPY_UNUSED(data))
3132
+ {
3133
+ /* bool type is one byte, so can just use the char */
3134
+
3135
+ while (N > 0) {
3136
+ *dst = 1;
3137
+
3138
+ dst += dst_stride;
3139
+ --N;
3140
+ }
3141
+ }
3142
+
3143
+ static void
3144
+ _null_to_contig_set_bool_one(char *dst,
3145
+ npy_intp NPY_UNUSED(dst_stride),
3146
+ char *NPY_UNUSED(src), npy_intp NPY_UNUSED(src_stride),
3147
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
3148
+ NpyAuxData *NPY_UNUSED(data))
3149
+ {
3150
+ /* bool type is one byte, so can just use the char */
3151
+
3152
+ memset(dst, 1, N);
3153
+ }
3154
+
3155
+ /* Only for the bool type, sets the destination to 1 */
3156
+ NPY_NO_EXPORT int
3157
+ get_bool_setdstone_transfer_function(npy_intp dst_stride,
3158
+ PyArray_StridedUnaryOp **out_stransfer,
3159
+ NpyAuxData **out_transferdata,
3160
+ int *NPY_UNUSED(out_needs_api))
3161
+ {
3162
+ if (dst_stride == 1) {
3163
+ *out_stransfer = &_null_to_contig_set_bool_one;
3164
+ }
3165
+ else {
3166
+ *out_stransfer = &_null_to_strided_set_bool_one;
3167
+ }
3168
+ *out_transferdata = NULL;
3169
+
3170
+ return NPY_SUCCEED;
3171
+ }
3172
+
3173
+ /*************************** DEST SETZERO *******************************/
3174
+
3175
+ /* Sets dest to zero */
3176
+ typedef struct {
3177
+ NpyAuxData base;
3178
+ npy_intp dst_itemsize;
3179
+ } _dst_memset_zero_data;
3180
+
3181
+ /* zero-padded data copy function */
3182
+ static NpyAuxData *_dst_memset_zero_data_clone(NpyAuxData *data)
3183
+ {
3184
+ _dst_memset_zero_data *newdata =
3185
+ (_dst_memset_zero_data *)PyArray_malloc(
3186
+ sizeof(_dst_memset_zero_data));
3187
+ if (newdata == NULL) {
3188
+ return NULL;
3189
+ }
3190
+
3191
+ memcpy(newdata, data, sizeof(_dst_memset_zero_data));
3192
+
3193
+ return (NpyAuxData *)newdata;
3194
+ }
3195
+
3196
+ static void
3197
+ _null_to_strided_memset_zero(char *dst,
3198
+ npy_intp dst_stride,
3199
+ char *NPY_UNUSED(src), npy_intp NPY_UNUSED(src_stride),
3200
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
3201
+ NpyAuxData *data)
3202
+ {
3203
+ _dst_memset_zero_data *d = (_dst_memset_zero_data *)data;
3204
+ npy_intp dst_itemsize = d->dst_itemsize;
3205
+
3206
+ while (N > 0) {
3207
+ memset(dst, 0, dst_itemsize);
3208
+ dst += dst_stride;
3209
+ --N;
3210
+ }
3211
+ }
3212
+
3213
+ static void
3214
+ _null_to_contig_memset_zero(char *dst,
3215
+ npy_intp dst_stride,
3216
+ char *NPY_UNUSED(src), npy_intp NPY_UNUSED(src_stride),
3217
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
3218
+ NpyAuxData *data)
3219
+ {
3220
+ _dst_memset_zero_data *d = (_dst_memset_zero_data *)data;
3221
+ npy_intp dst_itemsize = d->dst_itemsize;
3222
+
3223
+ memset(dst, 0, N*dst_itemsize);
3224
+ }
3225
+
3226
+ static void
3227
+ _null_to_strided_reference_setzero(char *dst,
3228
+ npy_intp dst_stride,
3229
+ char *NPY_UNUSED(src), npy_intp NPY_UNUSED(src_stride),
3230
+ npy_intp N, npy_intp NPY_UNUSED(src_itemsize),
3231
+ NpyAuxData *NPY_UNUSED(data))
3232
+ {
3233
+ PyObject *dst_ref = NULL;
3234
+
3235
+ while (N > 0) {
3236
+ NPY_COPY_PYOBJECT_PTR(&dst_ref, dst);
3237
+
3238
+ /* Release the reference in dst */
3239
+ NPY_DT_DBG_REFTRACE("dec dest ref (to set zero)", dst_ref);
3240
+ Py_XDECREF(dst_ref);
3241
+
3242
+ /* Set it to zero */
3243
+ dst_ref = NULL;
3244
+ NPY_COPY_PYOBJECT_PTR(dst, &dst_ref);
3245
+
3246
+ dst += dst_stride;
3247
+ --N;
3248
+ }
3249
+ }
3250
+
3251
+ NPY_NO_EXPORT int
3252
+ get_setdstzero_transfer_function(int aligned,
3253
+ npy_intp dst_stride,
3254
+ PyArray_Descr *dst_dtype,
3255
+ PyArray_StridedUnaryOp **out_stransfer,
3256
+ NpyAuxData **out_transferdata,
3257
+ int *out_needs_api)
3258
+ {
3259
+ _dst_memset_zero_data *data;
3260
+
3261
+ /* If there are no references, just set the whole thing to zero */
3262
+ if (!PyDataType_REFCHK(dst_dtype)) {
3263
+ data = (_dst_memset_zero_data *)
3264
+ PyArray_malloc(sizeof(_dst_memset_zero_data));
3265
+ if (data == NULL) {
3266
+ PyErr_NoMemory();
3267
+ return NPY_FAIL;
3268
+ }
3269
+
3270
+ data->base.free = (NpyAuxData_FreeFunc *)(&PyArray_free);
3271
+ data->base.clone = &_dst_memset_zero_data_clone;
3272
+ data->dst_itemsize = dst_dtype->elsize;
3273
+
3274
+ if (dst_stride == data->dst_itemsize) {
3275
+ *out_stransfer = &_null_to_contig_memset_zero;
3276
+ }
3277
+ else {
3278
+ *out_stransfer = &_null_to_strided_memset_zero;
3279
+ }
3280
+ *out_transferdata = (NpyAuxData *)data;
3281
+ }
3282
+ /* If it's exactly one reference, use the decref function */
3283
+ else if (dst_dtype->type_num == NPY_OBJECT) {
3284
+ if (out_needs_api) {
3285
+ *out_needs_api = 1;
3286
+ }
3287
+
3288
+ *out_stransfer = &_null_to_strided_reference_setzero;
3289
+ *out_transferdata = NULL;
3290
+ }
3291
+ /* If there are subarrays, need to wrap it */
3292
+ else if (PyDataType_HASSUBARRAY(dst_dtype)) {
3293
+ PyArray_Dims dst_shape = {NULL, -1};
3294
+ npy_intp dst_size = 1;
3295
+ PyArray_StridedUnaryOp *contig_stransfer;
3296
+ NpyAuxData *contig_data;
3297
+
3298
+ if (out_needs_api) {
3299
+ *out_needs_api = 1;
3300
+ }
3301
+
3302
+ if (!(PyArray_IntpConverter(dst_dtype->subarray->shape,
3303
+ &dst_shape))) {
3304
+ PyErr_SetString(PyExc_ValueError,
3305
+ "invalid subarray shape");
3306
+ return NPY_FAIL;
3307
+ }
3308
+ dst_size = PyArray_MultiplyList(dst_shape.ptr, dst_shape.len);
3309
+ PyDimMem_FREE(dst_shape.ptr);
3310
+
3311
+ /* Get a function for contiguous dst of the subarray type */
3312
+ if (get_setdstzero_transfer_function(aligned,
3313
+ dst_dtype->subarray->base->elsize,
3314
+ dst_dtype->subarray->base,
3315
+ &contig_stransfer, &contig_data,
3316
+ out_needs_api) != NPY_SUCCEED) {
3317
+ return NPY_FAIL;
3318
+ }
3319
+
3320
+ if (wrap_transfer_function_n_to_n(contig_stransfer, contig_data,
3321
+ 0, dst_stride,
3322
+ 0, dst_dtype->subarray->base->elsize,
3323
+ dst_size,
3324
+ out_stransfer, out_transferdata) != NPY_SUCCEED) {
3325
+ NPY_AUXDATA_FREE(contig_data);
3326
+ return NPY_FAIL;
3327
+ }
3328
+ }
3329
+ /* If there are fields, need to do each field */
3330
+ else if (PyDataType_HASFIELDS(dst_dtype)) {
3331
+ if (out_needs_api) {
3332
+ *out_needs_api = 1;
3333
+ }
3334
+
3335
+ return get_setdestzero_fields_transfer_function(aligned,
3336
+ dst_stride, dst_dtype,
3337
+ out_stransfer,
3338
+ out_transferdata,
3339
+ out_needs_api);
3340
+ }
3341
+
3342
+ return NPY_SUCCEED;
3343
+ }
3344
+
3345
+ static void
3346
+ _dec_src_ref_nop(char *NPY_UNUSED(dst),
3347
+ npy_intp NPY_UNUSED(dst_stride),
3348
+ char *NPY_UNUSED(src), npy_intp NPY_UNUSED(src_stride),
3349
+ npy_intp NPY_UNUSED(N),
3350
+ npy_intp NPY_UNUSED(src_itemsize),
3351
+ NpyAuxData *NPY_UNUSED(data))
3352
+ {
3353
+ /* NOP */
3354
+ }
3355
+
3356
+ static void
3357
+ _strided_to_null_dec_src_ref_reference(char *NPY_UNUSED(dst),
3358
+ npy_intp NPY_UNUSED(dst_stride),
3359
+ char *src, npy_intp src_stride,
3360
+ npy_intp N,
3361
+ npy_intp NPY_UNUSED(src_itemsize),
3362
+ NpyAuxData *NPY_UNUSED(data))
3363
+ {
3364
+ PyObject *src_ref = NULL;
3365
+ while (N > 0) {
3366
+ NPY_COPY_PYOBJECT_PTR(&src_ref, src);
3367
+
3368
+ /* Release the reference in src */
3369
+ NPY_DT_DBG_REFTRACE("dec src ref (null dst)", src_ref);
3370
+ Py_XDECREF(src_ref);
3371
+
3372
+ src += src_stride;
3373
+ --N;
3374
+ }
3375
+ }
3376
+
3377
+
3378
+ NPY_NO_EXPORT int
3379
+ get_decsrcref_transfer_function(int aligned,
3380
+ npy_intp src_stride,
3381
+ PyArray_Descr *src_dtype,
3382
+ PyArray_StridedUnaryOp **out_stransfer,
3383
+ NpyAuxData **out_transferdata,
3384
+ int *out_needs_api)
3385
+ {
3386
+ /* If there are no references, it's a nop */
3387
+ if (!PyDataType_REFCHK(src_dtype)) {
3388
+ *out_stransfer = &_dec_src_ref_nop;
3389
+ *out_transferdata = NULL;
3390
+
3391
+ return NPY_SUCCEED;
3392
+ }
3393
+ /* If it's a single reference, it's one decref */
3394
+ else if (src_dtype->type_num == NPY_OBJECT) {
3395
+ if (out_needs_api) {
3396
+ *out_needs_api = 1;
3397
+ }
3398
+
3399
+ *out_stransfer = &_strided_to_null_dec_src_ref_reference;
3400
+ *out_transferdata = NULL;
3401
+
3402
+ return NPY_SUCCEED;
3403
+ }
3404
+ /* If there are subarrays, need to wrap it */
3405
+ else if (PyDataType_HASSUBARRAY(src_dtype)) {
3406
+ PyArray_Dims src_shape = {NULL, -1};
3407
+ npy_intp src_size = 1;
3408
+ PyArray_StridedUnaryOp *stransfer;
3409
+ NpyAuxData *data;
3410
+
3411
+ if (out_needs_api) {
3412
+ *out_needs_api = 1;
3413
+ }
3414
+
3415
+ if (!(PyArray_IntpConverter(src_dtype->subarray->shape,
3416
+ &src_shape))) {
3417
+ PyErr_SetString(PyExc_ValueError,
3418
+ "invalid subarray shape");
3419
+ return NPY_FAIL;
3420
+ }
3421
+ src_size = PyArray_MultiplyList(src_shape.ptr, src_shape.len);
3422
+ PyDimMem_FREE(src_shape.ptr);
3423
+
3424
+ /* Get a function for contiguous src of the subarray type */
3425
+ if (get_decsrcref_transfer_function(aligned,
3426
+ src_dtype->subarray->base->elsize,
3427
+ src_dtype->subarray->base,
3428
+ &stransfer, &data,
3429
+ out_needs_api) != NPY_SUCCEED) {
3430
+ return NPY_FAIL;
3431
+ }
3432
+
3433
+ if (wrap_transfer_function_n_to_n(stransfer, data,
3434
+ src_stride, 0,
3435
+ src_dtype->subarray->base->elsize, 0,
3436
+ src_size,
3437
+ out_stransfer, out_transferdata) != NPY_SUCCEED) {
3438
+ NPY_AUXDATA_FREE(data);
3439
+ return NPY_FAIL;
3440
+ }
3441
+
3442
+ return NPY_SUCCEED;
3443
+ }
3444
+ /* If there are fields, need to do each field */
3445
+ else {
3446
+ if (out_needs_api) {
3447
+ *out_needs_api = 1;
3448
+ }
3449
+
3450
+ return get_decsrcref_fields_transfer_function(aligned,
3451
+ src_stride, src_dtype,
3452
+ out_stransfer,
3453
+ out_transferdata,
3454
+ out_needs_api);
3455
+ }
3456
+ }
3457
+
3458
+ /********************* DTYPE COPY SWAP FUNCTION ***********************/
3459
+
3460
+ NPY_NO_EXPORT int
3461
+ PyArray_GetDTypeCopySwapFn(int aligned,
3462
+ npy_intp src_stride, npy_intp dst_stride,
3463
+ PyArray_Descr *dtype,
3464
+ PyArray_StridedUnaryOp **outstransfer,
3465
+ NpyAuxData **outtransferdata)
3466
+ {
3467
+ npy_intp itemsize = dtype->elsize;
3468
+
3469
+ /* If it's a custom data type, wrap its copy swap function */
3470
+ if (dtype->type_num >= NPY_NTYPES) {
3471
+ *outstransfer = NULL;
3472
+ wrap_copy_swap_function(aligned,
3473
+ src_stride, dst_stride,
3474
+ dtype,
3475
+ !PyArray_ISNBO(dtype->byteorder),
3476
+ outstransfer, outtransferdata);
3477
+ }
3478
+ /* A straight copy */
3479
+ else if (itemsize == 1 || PyArray_ISNBO(dtype->byteorder)) {
3480
+ *outstransfer = PyArray_GetStridedCopyFn(aligned,
3481
+ src_stride, dst_stride,
3482
+ itemsize);
3483
+ *outtransferdata = NULL;
3484
+ }
3485
+ /* If it's not complex, one swap */
3486
+ else if(dtype->kind != 'c') {
3487
+ *outstransfer = PyArray_GetStridedCopySwapFn(aligned,
3488
+ src_stride, dst_stride,
3489
+ itemsize);
3490
+ *outtransferdata = NULL;
3491
+ }
3492
+ /* If complex, a paired swap */
3493
+ else {
3494
+ *outstransfer = PyArray_GetStridedCopySwapPairFn(aligned,
3495
+ src_stride, dst_stride,
3496
+ itemsize);
3497
+ *outtransferdata = NULL;
3498
+ }
3499
+
3500
+ return (*outstransfer == NULL) ? NPY_FAIL : NPY_SUCCEED;
3501
+ }
3502
+
3503
+ /********************* MAIN DTYPE TRANSFER FUNCTION ***********************/
3504
+
3505
+ NPY_NO_EXPORT int
3506
+ PyArray_GetDTypeTransferFunction(int aligned,
3507
+ npy_intp src_stride, npy_intp dst_stride,
3508
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
3509
+ int move_references,
3510
+ PyArray_StridedUnaryOp **out_stransfer,
3511
+ NpyAuxData **out_transferdata,
3512
+ int *out_needs_api)
3513
+ {
3514
+ npy_intp src_itemsize, dst_itemsize;
3515
+ int src_type_num, dst_type_num;
3516
+
3517
+ #if NPY_DT_DBG_TRACING
3518
+ printf("Calculating dtype transfer from ");
3519
+ PyObject_Print((PyObject *)src_dtype, stdout, 0);
3520
+ printf(" to ");
3521
+ PyObject_Print((PyObject *)dst_dtype, stdout, 0);
3522
+ printf("\n");
3523
+ #endif
3524
+
3525
+ /*
3526
+ * If one of the dtypes is NULL, we give back either a src decref
3527
+ * function or a dst setzero function
3528
+ */
3529
+ if (dst_dtype == NULL) {
3530
+ if (move_references) {
3531
+ return get_decsrcref_transfer_function(aligned,
3532
+ src_dtype->elsize,
3533
+ src_dtype,
3534
+ out_stransfer, out_transferdata,
3535
+ out_needs_api);
3536
+ }
3537
+ else {
3538
+ *out_stransfer = &_dec_src_ref_nop;
3539
+ *out_transferdata = NULL;
3540
+ return NPY_SUCCEED;
3541
+ }
3542
+ }
3543
+ else if (src_dtype == NULL) {
3544
+ return get_setdstzero_transfer_function(aligned,
3545
+ dst_dtype->elsize,
3546
+ dst_dtype,
3547
+ out_stransfer, out_transferdata,
3548
+ out_needs_api);
3549
+ }
3550
+
3551
+ src_itemsize = src_dtype->elsize;
3552
+ dst_itemsize = dst_dtype->elsize;
3553
+ src_type_num = src_dtype->type_num;
3554
+ dst_type_num = dst_dtype->type_num;
3555
+
3556
+ /* Common special case - number -> number NBO cast */
3557
+ if (PyTypeNum_ISNUMBER(src_type_num) &&
3558
+ PyTypeNum_ISNUMBER(dst_type_num) &&
3559
+ PyArray_ISNBO(src_dtype->byteorder) &&
3560
+ PyArray_ISNBO(dst_dtype->byteorder)) {
3561
+
3562
+ if (PyArray_EquivTypenums(src_type_num, dst_type_num)) {
3563
+ *out_stransfer = PyArray_GetStridedCopyFn(aligned,
3564
+ src_stride, dst_stride,
3565
+ src_itemsize);
3566
+ *out_transferdata = NULL;
3567
+ return (*out_stransfer == NULL) ? NPY_FAIL : NPY_SUCCEED;
3568
+ }
3569
+ else {
3570
+ return get_nbo_cast_numeric_transfer_function (aligned,
3571
+ src_stride, dst_stride,
3572
+ src_type_num, dst_type_num,
3573
+ out_stransfer, out_transferdata);
3574
+ }
3575
+ }
3576
+
3577
+ /*
3578
+ * If there are no references and the data types are equivalent,
3579
+ * return a simple copy
3580
+ */
3581
+ if (!PyDataType_REFCHK(src_dtype) && !PyDataType_REFCHK(dst_dtype) &&
3582
+ PyArray_EquivTypes(src_dtype, dst_dtype)) {
3583
+ /*
3584
+ * We can't pass through the aligned flag because it's not
3585
+ * appropriate. Consider a size-8 string, it will say it's
3586
+ * aligned because strings only need alignment 1, but the
3587
+ * copy function wants to know if it's alignment 8.
3588
+ *
3589
+ * TODO: Change align from a flag to a "best power of 2 alignment"
3590
+ * which holds the strongest alignment value for all
3591
+ * the data which will be used.
3592
+ */
3593
+ *out_stransfer = PyArray_GetStridedCopyFn(0,
3594
+ src_stride, dst_stride,
3595
+ src_dtype->elsize);
3596
+ *out_transferdata = NULL;
3597
+ return NPY_SUCCEED;
3598
+ }
3599
+
3600
+ /* First look at the possibilities of just a copy or swap */
3601
+ if (src_itemsize == dst_itemsize && src_dtype->kind == dst_dtype->kind &&
3602
+ !PyDataType_HASFIELDS(src_dtype) &&
3603
+ !PyDataType_HASFIELDS(dst_dtype) &&
3604
+ !PyDataType_HASSUBARRAY(src_dtype) &&
3605
+ !PyDataType_HASSUBARRAY(dst_dtype) &&
3606
+ src_type_num != NPY_DATETIME && src_type_num != NPY_TIMEDELTA) {
3607
+ /* A custom data type requires that we use its copy/swap */
3608
+ if (src_type_num >= NPY_NTYPES || dst_type_num >= NPY_NTYPES) {
3609
+ /*
3610
+ * If the sizes and kinds are identical, but they're different
3611
+ * custom types, then get a cast function
3612
+ */
3613
+ if (src_type_num != dst_type_num) {
3614
+ return get_cast_transfer_function(aligned,
3615
+ src_stride, dst_stride,
3616
+ src_dtype, dst_dtype,
3617
+ move_references,
3618
+ out_stransfer, out_transferdata,
3619
+ out_needs_api);
3620
+ }
3621
+ else {
3622
+ return wrap_copy_swap_function(aligned,
3623
+ src_stride, dst_stride,
3624
+ src_dtype,
3625
+ PyArray_ISNBO(src_dtype->byteorder) !=
3626
+ PyArray_ISNBO(dst_dtype->byteorder),
3627
+ out_stransfer, out_transferdata);
3628
+ }
3629
+ }
3630
+
3631
+ /* The special types, which have no byte-order */
3632
+ switch (src_type_num) {
3633
+ case NPY_VOID:
3634
+ case NPY_STRING:
3635
+ case NPY_UNICODE:
3636
+ *out_stransfer = PyArray_GetStridedCopyFn(0,
3637
+ src_stride, dst_stride,
3638
+ src_itemsize);
3639
+ *out_transferdata = NULL;
3640
+ return NPY_SUCCEED;
3641
+ case NPY_OBJECT:
3642
+ if (out_needs_api) {
3643
+ *out_needs_api = 1;
3644
+ }
3645
+ if (move_references) {
3646
+ *out_stransfer = &_strided_to_strided_move_references;
3647
+ *out_transferdata = NULL;
3648
+ }
3649
+ else {
3650
+ *out_stransfer = &_strided_to_strided_copy_references;
3651
+ *out_transferdata = NULL;
3652
+ }
3653
+ return NPY_SUCCEED;
3654
+ }
3655
+
3656
+ /* This is a straight copy */
3657
+ if (src_itemsize == 1 || PyArray_ISNBO(src_dtype->byteorder) ==
3658
+ PyArray_ISNBO(dst_dtype->byteorder)) {
3659
+ *out_stransfer = PyArray_GetStridedCopyFn(aligned,
3660
+ src_stride, dst_stride,
3661
+ src_itemsize);
3662
+ *out_transferdata = NULL;
3663
+ return (*out_stransfer == NULL) ? NPY_FAIL : NPY_SUCCEED;
3664
+ }
3665
+ /* This is a straight copy + byte swap */
3666
+ else if (!PyTypeNum_ISCOMPLEX(src_type_num)) {
3667
+ *out_stransfer = PyArray_GetStridedCopySwapFn(aligned,
3668
+ src_stride, dst_stride,
3669
+ src_itemsize);
3670
+ *out_transferdata = NULL;
3671
+ return (*out_stransfer == NULL) ? NPY_FAIL : NPY_SUCCEED;
3672
+ }
3673
+ /* This is a straight copy + element pair byte swap */
3674
+ else {
3675
+ *out_stransfer = PyArray_GetStridedCopySwapPairFn(aligned,
3676
+ src_stride, dst_stride,
3677
+ src_itemsize);
3678
+ *out_transferdata = NULL;
3679
+ return (*out_stransfer == NULL) ? NPY_FAIL : NPY_SUCCEED;
3680
+ }
3681
+ }
3682
+
3683
+ /* Handle subarrays */
3684
+ if (PyDataType_HASSUBARRAY(src_dtype) ||
3685
+ PyDataType_HASSUBARRAY(dst_dtype)) {
3686
+ return get_subarray_transfer_function(aligned,
3687
+ src_stride, dst_stride,
3688
+ src_dtype, dst_dtype,
3689
+ move_references,
3690
+ out_stransfer, out_transferdata,
3691
+ out_needs_api);
3692
+ }
3693
+
3694
+ /* Handle fields */
3695
+ if ((PyDataType_HASFIELDS(src_dtype) || PyDataType_HASFIELDS(dst_dtype)) &&
3696
+ src_type_num != NPY_OBJECT && dst_type_num != NPY_OBJECT) {
3697
+ return get_fields_transfer_function(aligned,
3698
+ src_stride, dst_stride,
3699
+ src_dtype, dst_dtype,
3700
+ move_references,
3701
+ out_stransfer, out_transferdata,
3702
+ out_needs_api);
3703
+ }
3704
+
3705
+ /* Check for different-sized strings, unicodes, or voids */
3706
+ if (src_type_num == dst_type_num) {
3707
+ switch (src_type_num) {
3708
+ case NPY_STRING:
3709
+ case NPY_UNICODE:
3710
+ case NPY_VOID:
3711
+ return PyArray_GetStridedZeroPadCopyFn(0,
3712
+ src_stride, dst_stride,
3713
+ src_dtype->elsize, dst_dtype->elsize,
3714
+ out_stransfer, out_transferdata);
3715
+ }
3716
+ }
3717
+
3718
+ /* Otherwise a cast is necessary */
3719
+ return get_cast_transfer_function(aligned,
3720
+ src_stride, dst_stride,
3721
+ src_dtype, dst_dtype,
3722
+ move_references,
3723
+ out_stransfer, out_transferdata,
3724
+ out_needs_api);
3725
+ }
3726
+
3727
+ NPY_NO_EXPORT int
3728
+ PyArray_GetMaskedDTypeTransferFunction(int aligned,
3729
+ npy_intp src_stride,
3730
+ npy_intp dst_stride,
3731
+ npy_intp mask_stride,
3732
+ PyArray_Descr *src_dtype,
3733
+ PyArray_Descr *dst_dtype,
3734
+ PyArray_Descr *mask_dtype,
3735
+ int move_references,
3736
+ PyArray_MaskedStridedUnaryOp **out_stransfer,
3737
+ NpyAuxData **out_transferdata,
3738
+ int *out_needs_api)
3739
+ {
3740
+ PyArray_StridedUnaryOp *stransfer = NULL;
3741
+ NpyAuxData *transferdata = NULL;
3742
+ _masked_wrapper_transfer_data *data;
3743
+
3744
+ /* TODO: Add struct-based mask_dtype support later */
3745
+ if (mask_dtype->type_num != NPY_BOOL &&
3746
+ mask_dtype->type_num != NPY_UINT8) {
3747
+ PyErr_SetString(PyExc_TypeError,
3748
+ "Only bool and uint8 masks are supported at the moment, "
3749
+ "structs of bool/uint8 is planned for the future");
3750
+ return NPY_FAIL;
3751
+ }
3752
+
3753
+ /* TODO: Special case some important cases so they're fast */
3754
+
3755
+ /* Fall back to wrapping a non-masked transfer function */
3756
+ if (PyArray_GetDTypeTransferFunction(aligned,
3757
+ src_stride, dst_stride,
3758
+ src_dtype, dst_dtype,
3759
+ move_references,
3760
+ &stransfer, &transferdata,
3761
+ out_needs_api) != NPY_SUCCEED) {
3762
+ return NPY_FAIL;
3763
+ }
3764
+
3765
+ /* Create the wrapper function's auxdata */
3766
+ data = (_masked_wrapper_transfer_data *)PyArray_malloc(
3767
+ sizeof(_masked_wrapper_transfer_data));
3768
+ if (data == NULL) {
3769
+ PyErr_NoMemory();
3770
+ NPY_AUXDATA_FREE(transferdata);
3771
+ return NPY_FAIL;
3772
+ }
3773
+
3774
+ /* Fill in the auxdata object */
3775
+ memset(data, 0, sizeof(_masked_wrapper_transfer_data));
3776
+ data->base.free = &_masked_wrapper_transfer_data_free;
3777
+ data->base.clone = &_masked_wrapper_transfer_data_clone;
3778
+
3779
+ data->stransfer = stransfer;
3780
+ data->transferdata = transferdata;
3781
+
3782
+ /* If the src object will need a DECREF, get a function to handle that */
3783
+ if (move_references && PyDataType_REFCHK(src_dtype)) {
3784
+ if (get_decsrcref_transfer_function(aligned,
3785
+ src_stride,
3786
+ src_dtype,
3787
+ &data->decsrcref_stransfer,
3788
+ &data->decsrcref_transferdata,
3789
+ out_needs_api) != NPY_SUCCEED) {
3790
+ NPY_AUXDATA_FREE((NpyAuxData *)data);
3791
+ return NPY_FAIL;
3792
+ }
3793
+
3794
+ *out_stransfer = &_strided_masked_wrapper_decsrcref_transfer_function;
3795
+ }
3796
+ else {
3797
+ *out_stransfer = &_strided_masked_wrapper_transfer_function;
3798
+ }
3799
+
3800
+ *out_transferdata = (NpyAuxData *)data;
3801
+
3802
+ return NPY_SUCCEED;
3803
+ }
3804
+
3805
+ NPY_NO_EXPORT int
3806
+ PyArray_CastRawArrays(npy_intp count,
3807
+ char *src, char *dst,
3808
+ npy_intp src_stride, npy_intp dst_stride,
3809
+ PyArray_Descr *src_dtype, PyArray_Descr *dst_dtype,
3810
+ int move_references)
3811
+ {
3812
+ PyArray_StridedUnaryOp *stransfer = NULL;
3813
+ NpyAuxData *transferdata = NULL;
3814
+ int aligned = 1, needs_api = 0;
3815
+
3816
+ /* Make sure the copy is reasonable */
3817
+ if (dst_stride == 0 && count > 1) {
3818
+ PyErr_SetString(PyExc_ValueError,
3819
+ "NumPy CastRawArrays cannot do a reduction");
3820
+ return NPY_FAIL;
3821
+ }
3822
+ else if (count == 0) {
3823
+ return NPY_SUCCEED;
3824
+ }
3825
+
3826
+ /* Check data alignment */
3827
+ aligned = (((npy_intp)src | src_stride) &
3828
+ (src_dtype->alignment - 1)) == 0 &&
3829
+ (((npy_intp)dst | dst_stride) &
3830
+ (dst_dtype->alignment - 1)) == 0;
3831
+
3832
+ /* Get the function to do the casting */
3833
+ if (PyArray_GetDTypeTransferFunction(aligned,
3834
+ src_stride, dst_stride,
3835
+ src_dtype, dst_dtype,
3836
+ move_references,
3837
+ &stransfer, &transferdata,
3838
+ &needs_api) != NPY_SUCCEED) {
3839
+ return NPY_FAIL;
3840
+ }
3841
+
3842
+ /* Cast */
3843
+ stransfer(dst, dst_stride, src, src_stride, count,
3844
+ src_dtype->elsize, transferdata);
3845
+
3846
+ /* Cleanup */
3847
+ NPY_AUXDATA_FREE(transferdata);
3848
+
3849
+ /* If needs_api was set to 1, it may have raised a Python exception */
3850
+ return (needs_api && PyErr_Occurred()) ? NPY_FAIL : NPY_SUCCEED;
3851
+ }
3852
+
3853
+ /*
3854
+ * Prepares shape and strides for a simple raw array iteration.
3855
+ * This sorts the strides into FORTRAN order, reverses any negative
3856
+ * strides, then coalesces axes where possible. The results are
3857
+ * filled in the output parameters.
3858
+ *
3859
+ * This is intended for simple, lightweight iteration over arrays
3860
+ * where no buffering of any kind is needed, and the array may
3861
+ * not be stored as a PyArrayObject.
3862
+ *
3863
+ * The arrays shape, out_shape, strides, and out_strides must all
3864
+ * point to different data.
3865
+ *
3866
+ * Returns 0 on success, -1 on failure.
3867
+ */
3868
+ NPY_NO_EXPORT int
3869
+ PyArray_PrepareOneRawArrayIter(int ndim, npy_intp *shape,
3870
+ char *data, npy_intp *strides,
3871
+ int *out_ndim, npy_intp *out_shape,
3872
+ char **out_data, npy_intp *out_strides)
3873
+ {
3874
+ npy_stride_sort_item strideperm[NPY_MAXDIMS];
3875
+ int i, j;
3876
+
3877
+ /* Special case 0 and 1 dimensions */
3878
+ if (ndim == 0) {
3879
+ *out_ndim = 1;
3880
+ *out_data = data;
3881
+ out_shape[0] = 1;
3882
+ out_strides[0] = 0;
3883
+ return 0;
3884
+ }
3885
+ else if (ndim == 1) {
3886
+ npy_intp stride_entry = strides[0], shape_entry = shape[0];
3887
+ *out_ndim = 1;
3888
+ out_shape[0] = shape[0];
3889
+ /* Always make a positive stride */
3890
+ if (stride_entry >= 0) {
3891
+ *out_data = data;
3892
+ out_strides[0] = stride_entry;
3893
+ }
3894
+ else {
3895
+ *out_data = data + stride_entry * (shape_entry - 1);
3896
+ out_strides[0] = -stride_entry;
3897
+ }
3898
+ return 0;
3899
+ }
3900
+
3901
+ /* Sort the axes based on the destination strides */
3902
+ PyArray_CreateSortedStridePerm(ndim, strides, strideperm);
3903
+ for (i = 0; i < ndim; ++i) {
3904
+ int iperm = strideperm[ndim - i - 1].perm;
3905
+ out_shape[i] = shape[iperm];
3906
+ out_strides[i] = strides[iperm];
3907
+ }
3908
+
3909
+ /* Reverse any negative strides */
3910
+ for (i = 0; i < ndim; ++i) {
3911
+ npy_intp stride_entry = out_strides[i], shape_entry = out_shape[i];
3912
+
3913
+ if (stride_entry < 0) {
3914
+ data += stride_entry * (shape_entry - 1);
3915
+ out_strides[i] = -stride_entry;
3916
+ }
3917
+ /* Detect 0-size arrays here */
3918
+ if (shape_entry == 0) {
3919
+ *out_ndim = 1;
3920
+ *out_data = data;
3921
+ out_shape[0] = 0;
3922
+ out_strides[0] = 0;
3923
+ return 0;
3924
+ }
3925
+ }
3926
+
3927
+ /* Coalesce any dimensions where possible */
3928
+ i = 0;
3929
+ for (j = 1; j < ndim; ++j) {
3930
+ if (out_shape[i] == 1) {
3931
+ /* Drop axis i */
3932
+ out_shape[i] = out_shape[j];
3933
+ out_strides[i] = out_strides[j];
3934
+ }
3935
+ else if (out_shape[j] == 1) {
3936
+ /* Drop axis j */
3937
+ }
3938
+ else if (out_strides[i] * out_shape[i] == out_strides[j]) {
3939
+ /* Coalesce axes i and j */
3940
+ out_shape[i] *= out_shape[j];
3941
+ }
3942
+ else {
3943
+ /* Can't coalesce, go to next i */
3944
+ ++i;
3945
+ out_shape[i] = out_shape[j];
3946
+ out_strides[i] = out_strides[j];
3947
+ }
3948
+ }
3949
+ ndim = i+1;
3950
+
3951
+ #if 0
3952
+ /* DEBUG */
3953
+ {
3954
+ printf("raw iter ndim %d\n", ndim);
3955
+ printf("shape: ");
3956
+ for (i = 0; i < ndim; ++i) {
3957
+ printf("%d ", (int)out_shape[i]);
3958
+ }
3959
+ printf("\n");
3960
+ printf("strides: ");
3961
+ for (i = 0; i < ndim; ++i) {
3962
+ printf("%d ", (int)out_strides[i]);
3963
+ }
3964
+ printf("\n");
3965
+ }
3966
+ #endif
3967
+
3968
+ *out_data = data;
3969
+ *out_ndim = ndim;
3970
+ return 0;
3971
+ }
3972
+
3973
+ /*
3974
+ * The same as PyArray_PrepareOneRawArrayIter, but for two
3975
+ * operands instead of one. Any broadcasting of the two operands
3976
+ * should have already been done before calling this function,
3977
+ * as the ndim and shape is only specified once for both operands.
3978
+ *
3979
+ * Only the strides of the first operand are used to reorder
3980
+ * the dimensions, no attempt to consider all the strides together
3981
+ * is made, as is done in the NpyIter object.
3982
+ *
3983
+ * You can use this together with NPY_RAW_ITER_START and
3984
+ * NPY_RAW_ITER_TWO_NEXT to handle the looping boilerplate of everything
3985
+ * but the innermost loop (which is for idim == 0).
3986
+ *
3987
+ * Returns 0 on success, -1 on failure.
3988
+ */
3989
+ NPY_NO_EXPORT int
3990
+ PyArray_PrepareTwoRawArrayIter(int ndim, npy_intp *shape,
3991
+ char *dataA, npy_intp *stridesA,
3992
+ char *dataB, npy_intp *stridesB,
3993
+ int *out_ndim, npy_intp *out_shape,
3994
+ char **out_dataA, npy_intp *out_stridesA,
3995
+ char **out_dataB, npy_intp *out_stridesB)
3996
+ {
3997
+ npy_stride_sort_item strideperm[NPY_MAXDIMS];
3998
+ int i, j;
3999
+
4000
+ /* Special case 0 and 1 dimensions */
4001
+ if (ndim == 0) {
4002
+ *out_ndim = 1;
4003
+ *out_dataA = dataA;
4004
+ *out_dataB = dataB;
4005
+ out_shape[0] = 1;
4006
+ out_stridesA[0] = 0;
4007
+ out_stridesB[0] = 0;
4008
+ return 0;
4009
+ }
4010
+ else if (ndim == 1) {
4011
+ npy_intp stride_entryA = stridesA[0], stride_entryB = stridesB[0];
4012
+ npy_intp shape_entry = shape[0];
4013
+ *out_ndim = 1;
4014
+ out_shape[0] = shape[0];
4015
+ /* Always make a positive stride for the first operand */
4016
+ if (stride_entryA >= 0) {
4017
+ *out_dataA = dataA;
4018
+ *out_dataB = dataB;
4019
+ out_stridesA[0] = stride_entryA;
4020
+ out_stridesB[0] = stride_entryB;
4021
+ }
4022
+ else {
4023
+ *out_dataA = dataA + stride_entryA * (shape_entry - 1);
4024
+ *out_dataB = dataB + stride_entryB * (shape_entry - 1);
4025
+ out_stridesA[0] = -stride_entryA;
4026
+ out_stridesB[0] = -stride_entryB;
4027
+ }
4028
+ return 0;
4029
+ }
4030
+
4031
+ /* Sort the axes based on the destination strides */
4032
+ PyArray_CreateSortedStridePerm(ndim, stridesA, strideperm);
4033
+ for (i = 0; i < ndim; ++i) {
4034
+ int iperm = strideperm[ndim - i - 1].perm;
4035
+ out_shape[i] = shape[iperm];
4036
+ out_stridesA[i] = stridesA[iperm];
4037
+ out_stridesB[i] = stridesB[iperm];
4038
+ }
4039
+
4040
+ /* Reverse any negative strides of operand A */
4041
+ for (i = 0; i < ndim; ++i) {
4042
+ npy_intp stride_entryA = out_stridesA[i];
4043
+ npy_intp stride_entryB = out_stridesB[i];
4044
+ npy_intp shape_entry = out_shape[i];
4045
+
4046
+ if (stride_entryA < 0) {
4047
+ dataA += stride_entryA * (shape_entry - 1);
4048
+ dataB += stride_entryB * (shape_entry - 1);
4049
+ out_stridesA[i] = -stride_entryA;
4050
+ out_stridesB[i] = -stride_entryB;
4051
+ }
4052
+ /* Detect 0-size arrays here */
4053
+ if (shape_entry == 0) {
4054
+ *out_ndim = 1;
4055
+ *out_dataA = dataA;
4056
+ *out_dataB = dataB;
4057
+ out_shape[0] = 0;
4058
+ out_stridesA[0] = 0;
4059
+ out_stridesB[0] = 0;
4060
+ return 0;
4061
+ }
4062
+ }
4063
+
4064
+ /* Coalesce any dimensions where possible */
4065
+ i = 0;
4066
+ for (j = 1; j < ndim; ++j) {
4067
+ if (out_shape[i] == 1) {
4068
+ /* Drop axis i */
4069
+ out_shape[i] = out_shape[j];
4070
+ out_stridesA[i] = out_stridesA[j];
4071
+ out_stridesB[i] = out_stridesB[j];
4072
+ }
4073
+ else if (out_shape[j] == 1) {
4074
+ /* Drop axis j */
4075
+ }
4076
+ else if (out_stridesA[i] * out_shape[i] == out_stridesA[j] &&
4077
+ out_stridesB[i] * out_shape[i] == out_stridesB[j]) {
4078
+ /* Coalesce axes i and j */
4079
+ out_shape[i] *= out_shape[j];
4080
+ }
4081
+ else {
4082
+ /* Can't coalesce, go to next i */
4083
+ ++i;
4084
+ out_shape[i] = out_shape[j];
4085
+ out_stridesA[i] = out_stridesA[j];
4086
+ out_stridesB[i] = out_stridesB[j];
4087
+ }
4088
+ }
4089
+ ndim = i+1;
4090
+
4091
+ *out_dataA = dataA;
4092
+ *out_dataB = dataB;
4093
+ *out_ndim = ndim;
4094
+ return 0;
4095
+ }
4096
+
4097
+ /*
4098
+ * The same as PyArray_PrepareOneRawArrayIter, but for three
4099
+ * operands instead of one. Any broadcasting of the three operands
4100
+ * should have already been done before calling this function,
4101
+ * as the ndim and shape is only specified once for all operands.
4102
+ *
4103
+ * Only the strides of the first operand are used to reorder
4104
+ * the dimensions, no attempt to consider all the strides together
4105
+ * is made, as is done in the NpyIter object.
4106
+ *
4107
+ * You can use this together with NPY_RAW_ITER_START and
4108
+ * NPY_RAW_ITER_THREE_NEXT to handle the looping boilerplate of everything
4109
+ * but the innermost loop (which is for idim == 0).
4110
+ *
4111
+ * Returns 0 on success, -1 on failure.
4112
+ */
4113
+ NPY_NO_EXPORT int
4114
+ PyArray_PrepareThreeRawArrayIter(int ndim, npy_intp *shape,
4115
+ char *dataA, npy_intp *stridesA,
4116
+ char *dataB, npy_intp *stridesB,
4117
+ char *dataC, npy_intp *stridesC,
4118
+ int *out_ndim, npy_intp *out_shape,
4119
+ char **out_dataA, npy_intp *out_stridesA,
4120
+ char **out_dataB, npy_intp *out_stridesB,
4121
+ char **out_dataC, npy_intp *out_stridesC)
4122
+ {
4123
+ npy_stride_sort_item strideperm[NPY_MAXDIMS];
4124
+ int i, j;
4125
+
4126
+ /* Special case 0 and 1 dimensions */
4127
+ if (ndim == 0) {
4128
+ *out_ndim = 1;
4129
+ *out_dataA = dataA;
4130
+ *out_dataB = dataB;
4131
+ *out_dataC = dataC;
4132
+ out_shape[0] = 1;
4133
+ out_stridesA[0] = 0;
4134
+ out_stridesB[0] = 0;
4135
+ out_stridesC[0] = 0;
4136
+ return 0;
4137
+ }
4138
+ else if (ndim == 1) {
4139
+ npy_intp stride_entryA = stridesA[0];
4140
+ npy_intp stride_entryB = stridesB[0];
4141
+ npy_intp stride_entryC = stridesC[0];
4142
+ npy_intp shape_entry = shape[0];
4143
+ *out_ndim = 1;
4144
+ out_shape[0] = shape[0];
4145
+ /* Always make a positive stride for the first operand */
4146
+ if (stride_entryA >= 0) {
4147
+ *out_dataA = dataA;
4148
+ *out_dataB = dataB;
4149
+ *out_dataC = dataC;
4150
+ out_stridesA[0] = stride_entryA;
4151
+ out_stridesB[0] = stride_entryB;
4152
+ out_stridesC[0] = stride_entryC;
4153
+ }
4154
+ else {
4155
+ *out_dataA = dataA + stride_entryA * (shape_entry - 1);
4156
+ *out_dataB = dataB + stride_entryB * (shape_entry - 1);
4157
+ *out_dataC = dataC + stride_entryC * (shape_entry - 1);
4158
+ out_stridesA[0] = -stride_entryA;
4159
+ out_stridesB[0] = -stride_entryB;
4160
+ out_stridesC[0] = -stride_entryC;
4161
+ }
4162
+ return 0;
4163
+ }
4164
+
4165
+ /* Sort the axes based on the destination strides */
4166
+ PyArray_CreateSortedStridePerm(ndim, stridesA, strideperm);
4167
+ for (i = 0; i < ndim; ++i) {
4168
+ int iperm = strideperm[ndim - i - 1].perm;
4169
+ out_shape[i] = shape[iperm];
4170
+ out_stridesA[i] = stridesA[iperm];
4171
+ out_stridesB[i] = stridesB[iperm];
4172
+ out_stridesC[i] = stridesC[iperm];
4173
+ }
4174
+
4175
+ /* Reverse any negative strides of operand A */
4176
+ for (i = 0; i < ndim; ++i) {
4177
+ npy_intp stride_entryA = out_stridesA[i];
4178
+ npy_intp stride_entryB = out_stridesB[i];
4179
+ npy_intp stride_entryC = out_stridesC[i];
4180
+ npy_intp shape_entry = out_shape[i];
4181
+
4182
+ if (stride_entryA < 0) {
4183
+ dataA += stride_entryA * (shape_entry - 1);
4184
+ dataB += stride_entryB * (shape_entry - 1);
4185
+ dataC += stride_entryC * (shape_entry - 1);
4186
+ out_stridesA[i] = -stride_entryA;
4187
+ out_stridesB[i] = -stride_entryB;
4188
+ out_stridesC[i] = -stride_entryC;
4189
+ }
4190
+ /* Detect 0-size arrays here */
4191
+ if (shape_entry == 0) {
4192
+ *out_ndim = 1;
4193
+ *out_dataA = dataA;
4194
+ *out_dataB = dataB;
4195
+ *out_dataC = dataC;
4196
+ out_shape[0] = 0;
4197
+ out_stridesA[0] = 0;
4198
+ out_stridesB[0] = 0;
4199
+ out_stridesC[0] = 0;
4200
+ return 0;
4201
+ }
4202
+ }
4203
+
4204
+ /* Coalesce any dimensions where possible */
4205
+ i = 0;
4206
+ for (j = 1; j < ndim; ++j) {
4207
+ if (out_shape[i] == 1) {
4208
+ /* Drop axis i */
4209
+ out_shape[i] = out_shape[j];
4210
+ out_stridesA[i] = out_stridesA[j];
4211
+ out_stridesB[i] = out_stridesB[j];
4212
+ out_stridesC[i] = out_stridesC[j];
4213
+ }
4214
+ else if (out_shape[j] == 1) {
4215
+ /* Drop axis j */
4216
+ }
4217
+ else if (out_stridesA[i] * out_shape[i] == out_stridesA[j] &&
4218
+ out_stridesB[i] * out_shape[i] == out_stridesB[j] &&
4219
+ out_stridesC[i] * out_shape[i] == out_stridesC[j]) {
4220
+ /* Coalesce axes i and j */
4221
+ out_shape[i] *= out_shape[j];
4222
+ }
4223
+ else {
4224
+ /* Can't coalesce, go to next i */
4225
+ ++i;
4226
+ out_shape[i] = out_shape[j];
4227
+ out_stridesA[i] = out_stridesA[j];
4228
+ out_stridesB[i] = out_stridesB[j];
4229
+ out_stridesC[i] = out_stridesC[j];
4230
+ }
4231
+ }
4232
+ ndim = i+1;
4233
+
4234
+ *out_dataA = dataA;
4235
+ *out_dataB = dataB;
4236
+ *out_dataC = dataC;
4237
+ *out_ndim = ndim;
4238
+ return 0;
4239
+ }