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,3821 @@
1
+ /*
2
+ * This file implements core functionality for NumPy datetime.
3
+ *
4
+ * Written by Mark Wiebe (mwwiebe@gmail.com)
5
+ * Copyright (c) 2011 by Enthought, Inc.
6
+ *
7
+ * See LICENSE.txt for the license.
8
+ */
9
+
10
+ #define PY_SSIZE_T_CLEAN
11
+ #include <Python.h>
12
+ #include <datetime.h>
13
+
14
+ #include <time.h>
15
+
16
+ #define NPY_NO_DEPRECATED_API NPY_API_VERSION
17
+ #define _MULTIARRAYMODULE
18
+ #include <numpy/arrayobject.h>
19
+
20
+ #include "npy_config.h"
21
+ #include "npy_pycompat.h"
22
+
23
+ #include "numpy/arrayscalars.h"
24
+ #include "methods.h"
25
+ #include "_datetime.h"
26
+ #include "datetime_strings.h"
27
+
28
+ /*
29
+ * Imports the PyDateTime functions so we can create these objects.
30
+ * This is called during module initialization
31
+ */
32
+ NPY_NO_EXPORT void
33
+ numpy_pydatetime_import(void)
34
+ {
35
+ PyDateTime_IMPORT;
36
+ }
37
+
38
+ /* Exported as DATETIMEUNITS in multiarraymodule.c */
39
+ NPY_NO_EXPORT char *_datetime_strings[NPY_DATETIME_NUMUNITS] = {
40
+ "Y",
41
+ "M",
42
+ "W",
43
+ "<invalid>",
44
+ "D",
45
+ "h",
46
+ "m",
47
+ "s",
48
+ "ms",
49
+ "us",
50
+ "ns",
51
+ "ps",
52
+ "fs",
53
+ "as",
54
+ "generic"
55
+ };
56
+
57
+ /* Days per month, regular year and leap year */
58
+ NPY_NO_EXPORT int _days_per_month_table[2][12] = {
59
+ { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
60
+ { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
61
+ };
62
+
63
+ /*
64
+ * Returns 1 if the given year is a leap year, 0 otherwise.
65
+ */
66
+ NPY_NO_EXPORT int
67
+ is_leapyear(npy_int64 year)
68
+ {
69
+ return (year & 0x3) == 0 && /* year % 4 == 0 */
70
+ ((year % 100) != 0 ||
71
+ (year % 400) == 0);
72
+ }
73
+
74
+ /*
75
+ * Calculates the days offset from the 1970 epoch.
76
+ */
77
+ NPY_NO_EXPORT npy_int64
78
+ get_datetimestruct_days(const npy_datetimestruct *dts)
79
+ {
80
+ int i, month;
81
+ npy_int64 year, days = 0;
82
+ int *month_lengths;
83
+
84
+ year = dts->year - 1970;
85
+ days = year * 365;
86
+
87
+ /* Adjust for leap years */
88
+ if (days >= 0) {
89
+ /*
90
+ * 1968 is the closest leap year before 1970.
91
+ * Exclude the current year, so add 1.
92
+ */
93
+ year += 1;
94
+ /* Add one day for each 4 years */
95
+ days += year / 4;
96
+ /* 1900 is the closest previous year divisible by 100 */
97
+ year += 68;
98
+ /* Subtract one day for each 100 years */
99
+ days -= year / 100;
100
+ /* 1600 is the closest previous year divisible by 400 */
101
+ year += 300;
102
+ /* Add one day for each 400 years */
103
+ days += year / 400;
104
+ }
105
+ else {
106
+ /*
107
+ * 1972 is the closest later year after 1970.
108
+ * Include the current year, so subtract 2.
109
+ */
110
+ year -= 2;
111
+ /* Subtract one day for each 4 years */
112
+ days += year / 4;
113
+ /* 2000 is the closest later year divisible by 100 */
114
+ year -= 28;
115
+ /* Add one day for each 100 years */
116
+ days -= year / 100;
117
+ /* 2000 is also the closest later year divisible by 400 */
118
+ /* Subtract one day for each 400 years */
119
+ days += year / 400;
120
+ }
121
+
122
+ month_lengths = _days_per_month_table[is_leapyear(dts->year)];
123
+ month = dts->month - 1;
124
+
125
+ /* Add the months */
126
+ for (i = 0; i < month; ++i) {
127
+ days += month_lengths[i];
128
+ }
129
+
130
+ /* Add the days */
131
+ days += dts->day - 1;
132
+
133
+ return days;
134
+ }
135
+
136
+ /*
137
+ * Calculates the minutes offset from the 1970 epoch.
138
+ */
139
+ NPY_NO_EXPORT npy_int64
140
+ get_datetimestruct_minutes(const npy_datetimestruct *dts)
141
+ {
142
+ npy_int64 days = get_datetimestruct_days(dts) * 24 * 60;
143
+ days += dts->hour * 60;
144
+ days += dts->min;
145
+
146
+ return days;
147
+ }
148
+
149
+ /*
150
+ * Modifies '*days_' to be the day offset within the year,
151
+ * and returns the year.
152
+ */
153
+ static npy_int64
154
+ days_to_yearsdays(npy_int64 *days_)
155
+ {
156
+ const npy_int64 days_per_400years = (400*365 + 100 - 4 + 1);
157
+ /* Adjust so it's relative to the year 2000 (divisible by 400) */
158
+ npy_int64 days = (*days_) - (365*30 + 7);
159
+ npy_int64 year;
160
+
161
+ /* Break down the 400 year cycle to get the year and day within the year */
162
+ if (days >= 0) {
163
+ year = 400 * (days / days_per_400years);
164
+ days = days % days_per_400years;
165
+ }
166
+ else {
167
+ year = 400 * ((days - (days_per_400years - 1)) / days_per_400years);
168
+ days = days % days_per_400years;
169
+ if (days < 0) {
170
+ days += days_per_400years;
171
+ }
172
+ }
173
+
174
+ /* Work out the year/day within the 400 year cycle */
175
+ if (days >= 366) {
176
+ year += 100 * ((days-1) / (100*365 + 25 - 1));
177
+ days = (days-1) % (100*365 + 25 - 1);
178
+ if (days >= 365) {
179
+ year += 4 * ((days+1) / (4*365 + 1));
180
+ days = (days+1) % (4*365 + 1);
181
+ if (days >= 366) {
182
+ year += (days-1) / 365;
183
+ days = (days-1) % 365;
184
+ }
185
+ }
186
+ }
187
+
188
+ *days_ = days;
189
+ return year + 2000;
190
+ }
191
+
192
+ /* Extracts the month number from a 'datetime64[D]' value */
193
+ NPY_NO_EXPORT int
194
+ days_to_month_number(npy_datetime days)
195
+ {
196
+ npy_int64 year;
197
+ int *month_lengths, i;
198
+
199
+ year = days_to_yearsdays(&days);
200
+ month_lengths = _days_per_month_table[is_leapyear(year)];
201
+
202
+ for (i = 0; i < 12; ++i) {
203
+ if (days < month_lengths[i]) {
204
+ return i + 1;
205
+ }
206
+ else {
207
+ days -= month_lengths[i];
208
+ }
209
+ }
210
+
211
+ /* Should never get here */
212
+ return 1;
213
+ }
214
+
215
+ /*
216
+ * Fills in the year, month, day in 'dts' based on the days
217
+ * offset from 1970.
218
+ */
219
+ static void
220
+ set_datetimestruct_days(npy_int64 days, npy_datetimestruct *dts)
221
+ {
222
+ int *month_lengths, i;
223
+
224
+ dts->year = days_to_yearsdays(&days);
225
+ month_lengths = _days_per_month_table[is_leapyear(dts->year)];
226
+
227
+ for (i = 0; i < 12; ++i) {
228
+ if (days < month_lengths[i]) {
229
+ dts->month = i + 1;
230
+ dts->day = (int)days + 1;
231
+ return;
232
+ }
233
+ else {
234
+ days -= month_lengths[i];
235
+ }
236
+ }
237
+ }
238
+
239
+ /*
240
+ * Converts a datetime from a datetimestruct to a datetime based
241
+ * on some metadata. The date is assumed to be valid.
242
+ *
243
+ * TODO: If meta->num is really big, there could be overflow
244
+ *
245
+ * Returns 0 on success, -1 on failure.
246
+ */
247
+ NPY_NO_EXPORT int
248
+ convert_datetimestruct_to_datetime(PyArray_DatetimeMetaData *meta,
249
+ const npy_datetimestruct *dts,
250
+ npy_datetime *out)
251
+ {
252
+ npy_datetime ret;
253
+ NPY_DATETIMEUNIT base = meta->base;
254
+
255
+ /* If the datetimestruct is NaT, return NaT */
256
+ if (dts->year == NPY_DATETIME_NAT) {
257
+ *out = NPY_DATETIME_NAT;
258
+ return 0;
259
+ }
260
+
261
+ /* Cannot instantiate a datetime with generic units */
262
+ if (meta->base == NPY_FR_GENERIC) {
263
+ PyErr_SetString(PyExc_ValueError,
264
+ "Cannot create a NumPy datetime other than NaT "
265
+ "with generic units");
266
+ return -1;
267
+ }
268
+
269
+ if (base == NPY_FR_Y) {
270
+ /* Truncate to the year */
271
+ ret = dts->year - 1970;
272
+ }
273
+ else if (base == NPY_FR_M) {
274
+ /* Truncate to the month */
275
+ ret = 12 * (dts->year - 1970) + (dts->month - 1);
276
+ }
277
+ else {
278
+ /* Otherwise calculate the number of days to start */
279
+ npy_int64 days = get_datetimestruct_days(dts);
280
+
281
+ switch (base) {
282
+ case NPY_FR_W:
283
+ /* Truncate to weeks */
284
+ if (days >= 0) {
285
+ ret = days / 7;
286
+ }
287
+ else {
288
+ ret = (days - 6) / 7;
289
+ }
290
+ break;
291
+ case NPY_FR_D:
292
+ ret = days;
293
+ break;
294
+ case NPY_FR_h:
295
+ ret = days * 24 +
296
+ dts->hour;
297
+ break;
298
+ case NPY_FR_m:
299
+ ret = (days * 24 +
300
+ dts->hour) * 60 +
301
+ dts->min;
302
+ break;
303
+ case NPY_FR_s:
304
+ ret = ((days * 24 +
305
+ dts->hour) * 60 +
306
+ dts->min) * 60 +
307
+ dts->sec;
308
+ break;
309
+ case NPY_FR_ms:
310
+ ret = (((days * 24 +
311
+ dts->hour) * 60 +
312
+ dts->min) * 60 +
313
+ dts->sec) * 1000 +
314
+ dts->us / 1000;
315
+ break;
316
+ case NPY_FR_us:
317
+ ret = (((days * 24 +
318
+ dts->hour) * 60 +
319
+ dts->min) * 60 +
320
+ dts->sec) * 1000000 +
321
+ dts->us;
322
+ break;
323
+ case NPY_FR_ns:
324
+ ret = ((((days * 24 +
325
+ dts->hour) * 60 +
326
+ dts->min) * 60 +
327
+ dts->sec) * 1000000 +
328
+ dts->us) * 1000 +
329
+ dts->ps / 1000;
330
+ break;
331
+ case NPY_FR_ps:
332
+ ret = ((((days * 24 +
333
+ dts->hour) * 60 +
334
+ dts->min) * 60 +
335
+ dts->sec) * 1000000 +
336
+ dts->us) * 1000000 +
337
+ dts->ps;
338
+ break;
339
+ case NPY_FR_fs:
340
+ /* only 2.6 hours */
341
+ ret = (((((days * 24 +
342
+ dts->hour) * 60 +
343
+ dts->min) * 60 +
344
+ dts->sec) * 1000000 +
345
+ dts->us) * 1000000 +
346
+ dts->ps) * 1000 +
347
+ dts->as / 1000;
348
+ break;
349
+ case NPY_FR_as:
350
+ /* only 9.2 secs */
351
+ ret = (((((days * 24 +
352
+ dts->hour) * 60 +
353
+ dts->min) * 60 +
354
+ dts->sec) * 1000000 +
355
+ dts->us) * 1000000 +
356
+ dts->ps) * 1000000 +
357
+ dts->as;
358
+ break;
359
+ default:
360
+ /* Something got corrupted */
361
+ PyErr_SetString(PyExc_ValueError,
362
+ "NumPy datetime metadata with corrupt unit value");
363
+ return -1;
364
+ }
365
+ }
366
+
367
+ /* Divide by the multiplier */
368
+ if (meta->num > 1) {
369
+ if (ret >= 0) {
370
+ ret /= meta->num;
371
+ }
372
+ else {
373
+ ret = (ret - meta->num + 1) / meta->num;
374
+ }
375
+ }
376
+
377
+ *out = ret;
378
+
379
+ return 0;
380
+ }
381
+
382
+ /*NUMPY_API
383
+ * Create a datetime value from a filled datetime struct and resolution unit.
384
+ *
385
+ * TO BE REMOVED - NOT USED INTERNALLY.
386
+ */
387
+ NPY_NO_EXPORT npy_datetime
388
+ PyArray_DatetimeStructToDatetime(NPY_DATETIMEUNIT fr, npy_datetimestruct *d)
389
+ {
390
+ PyErr_SetString(PyExc_RuntimeError,
391
+ "The NumPy PyArray_DatetimeStructToDatetime function has "
392
+ "been removed");
393
+ return -1;
394
+ }
395
+
396
+ /*NUMPY_API
397
+ * Create a timdelta value from a filled timedelta struct and resolution unit.
398
+ *
399
+ * TO BE REMOVED - NOT USED INTERNALLY.
400
+ */
401
+ NPY_NO_EXPORT npy_datetime
402
+ PyArray_TimedeltaStructToTimedelta(NPY_DATETIMEUNIT fr, npy_timedeltastruct *d)
403
+ {
404
+ PyErr_SetString(PyExc_RuntimeError,
405
+ "The NumPy PyArray_TimedeltaStructToTimedelta function has "
406
+ "been removed");
407
+ return -1;
408
+ }
409
+
410
+ /*
411
+ * Converts a datetime based on the given metadata into a datetimestruct
412
+ */
413
+ NPY_NO_EXPORT int
414
+ convert_datetime_to_datetimestruct(PyArray_DatetimeMetaData *meta,
415
+ npy_datetime dt,
416
+ npy_datetimestruct *out)
417
+ {
418
+ npy_int64 perday;
419
+
420
+ /* Initialize the output to all zeros */
421
+ memset(out, 0, sizeof(npy_datetimestruct));
422
+ out->year = 1970;
423
+ out->month = 1;
424
+ out->day = 1;
425
+
426
+ /* NaT is signaled in the year */
427
+ if (dt == NPY_DATETIME_NAT) {
428
+ out->year = NPY_DATETIME_NAT;
429
+ return 0;
430
+ }
431
+
432
+ /* Datetimes can't be in generic units */
433
+ if (meta->base == NPY_FR_GENERIC) {
434
+ PyErr_SetString(PyExc_ValueError,
435
+ "Cannot convert a NumPy datetime value other than NaT "
436
+ "with generic units");
437
+ return -1;
438
+ }
439
+
440
+ /* TODO: Change to a mechanism that avoids the potential overflow */
441
+ dt *= meta->num;
442
+
443
+ /*
444
+ * Note that care must be taken with the / and % operators
445
+ * for negative values.
446
+ */
447
+ switch (meta->base) {
448
+ case NPY_FR_Y:
449
+ out->year = 1970 + dt;
450
+ break;
451
+
452
+ case NPY_FR_M:
453
+ if (dt >= 0) {
454
+ out->year = 1970 + dt / 12;
455
+ out->month = dt % 12 + 1;
456
+ }
457
+ else {
458
+ out->year = 1969 + (dt + 1) / 12;
459
+ out->month = 12 + (dt + 1)% 12;
460
+ }
461
+ break;
462
+
463
+ case NPY_FR_W:
464
+ /* A week is 7 days */
465
+ set_datetimestruct_days(dt * 7, out);
466
+ break;
467
+
468
+ case NPY_FR_D:
469
+ set_datetimestruct_days(dt, out);
470
+ break;
471
+
472
+ case NPY_FR_h:
473
+ perday = 24LL;
474
+
475
+ if (dt >= 0) {
476
+ set_datetimestruct_days(dt / perday, out);
477
+ dt = dt % perday;
478
+ }
479
+ else {
480
+ set_datetimestruct_days((dt - (perday-1)) / perday, out);
481
+ dt = (perday-1) + (dt + 1) % perday;
482
+ }
483
+ out->hour = (int)dt;
484
+ break;
485
+
486
+ case NPY_FR_m:
487
+ perday = 24LL * 60;
488
+
489
+ if (dt >= 0) {
490
+ set_datetimestruct_days(dt / perday, out);
491
+ dt = dt % perday;
492
+ }
493
+ else {
494
+ set_datetimestruct_days((dt - (perday-1)) / perday, out);
495
+ dt = (perday-1) + (dt + 1) % perday;
496
+ }
497
+ out->hour = (int)(dt / 60);
498
+ out->min = (int)(dt % 60);
499
+ break;
500
+
501
+ case NPY_FR_s:
502
+ perday = 24LL * 60 * 60;
503
+
504
+ if (dt >= 0) {
505
+ set_datetimestruct_days(dt / perday, out);
506
+ dt = dt % perday;
507
+ }
508
+ else {
509
+ set_datetimestruct_days((dt - (perday-1)) / perday, out);
510
+ dt = (perday-1) + (dt + 1) % perday;
511
+ }
512
+ out->hour = (int)(dt / (60*60));
513
+ out->min = (int)((dt / 60) % 60);
514
+ out->sec = (int)(dt % 60);
515
+ break;
516
+
517
+ case NPY_FR_ms:
518
+ perday = 24LL * 60 * 60 * 1000;
519
+
520
+ if (dt >= 0) {
521
+ set_datetimestruct_days(dt / perday, out);
522
+ dt = dt % perday;
523
+ }
524
+ else {
525
+ set_datetimestruct_days((dt - (perday-1)) / perday, out);
526
+ dt = (perday-1) + (dt + 1) % perday;
527
+ }
528
+ out->hour = (int)(dt / (60*60*1000LL));
529
+ out->min = (int)((dt / (60*1000LL)) % 60);
530
+ out->sec = (int)((dt / 1000LL) % 60);
531
+ out->us = (int)((dt % 1000LL) * 1000);
532
+ break;
533
+
534
+ case NPY_FR_us:
535
+ perday = 24LL * 60LL * 60LL * 1000LL * 1000LL;
536
+
537
+ if (dt >= 0) {
538
+ set_datetimestruct_days(dt / perday, out);
539
+ dt = dt % perday;
540
+ }
541
+ else {
542
+ set_datetimestruct_days((dt - (perday-1)) / perday, out);
543
+ dt = (perday-1) + (dt + 1) % perday;
544
+ }
545
+ out->hour = (int)(dt / (60*60*1000000LL));
546
+ out->min = (int)((dt / (60*1000000LL)) % 60);
547
+ out->sec = (int)((dt / 1000000LL) % 60);
548
+ out->us = (int)(dt % 1000000LL);
549
+ break;
550
+
551
+ case NPY_FR_ns:
552
+ perday = 24LL * 60LL * 60LL * 1000LL * 1000LL * 1000LL;
553
+
554
+ if (dt >= 0) {
555
+ set_datetimestruct_days(dt / perday, out);
556
+ dt = dt % perday;
557
+ }
558
+ else {
559
+ set_datetimestruct_days((dt - (perday-1)) / perday, out);
560
+ dt = (perday-1) + (dt + 1) % perday;
561
+ }
562
+ out->hour = (int)(dt / (60*60*1000000000LL));
563
+ out->min = (int)((dt / (60*1000000000LL)) % 60);
564
+ out->sec = (int)((dt / 1000000000LL) % 60);
565
+ out->us = (int)((dt / 1000LL) % 1000000LL);
566
+ out->ps = (int)((dt % 1000LL) * 1000);
567
+ break;
568
+
569
+ case NPY_FR_ps:
570
+ perday = 24LL * 60 * 60 * 1000 * 1000 * 1000 * 1000;
571
+
572
+ if (dt >= 0) {
573
+ set_datetimestruct_days(dt / perday, out);
574
+ dt = dt % perday;
575
+ }
576
+ else {
577
+ set_datetimestruct_days((dt - (perday-1)) / perday, out);
578
+ dt = (perday-1) + (dt + 1) % perday;
579
+ }
580
+ out->hour = (int)(dt / (60*60*1000000000000LL));
581
+ out->min = (int)((dt / (60*1000000000000LL)) % 60);
582
+ out->sec = (int)((dt / 1000000000000LL) % 60);
583
+ out->us = (int)((dt / 1000000LL) % 1000000LL);
584
+ out->ps = (int)(dt % 1000000LL);
585
+ break;
586
+
587
+ case NPY_FR_fs:
588
+ /* entire range is only +- 2.6 hours */
589
+ if (dt >= 0) {
590
+ out->hour = (int)(dt / (60*60*1000000000000000LL));
591
+ out->min = (int)((dt / (60*1000000000000000LL)) % 60);
592
+ out->sec = (int)((dt / 1000000000000000LL) % 60);
593
+ out->us = (int)((dt / 1000000000LL) % 1000000LL);
594
+ out->ps = (int)((dt / 1000LL) % 1000000LL);
595
+ out->as = (int)((dt % 1000LL) * 1000);
596
+ }
597
+ else {
598
+ npy_datetime minutes;
599
+
600
+ minutes = dt / (60*1000000000000000LL);
601
+ dt = dt % (60*1000000000000000LL);
602
+ if (dt < 0) {
603
+ dt += (60*1000000000000000LL);
604
+ --minutes;
605
+ }
606
+ /* Offset the negative minutes */
607
+ add_minutes_to_datetimestruct(out, minutes);
608
+ out->sec = (int)((dt / 1000000000000000LL) % 60);
609
+ out->us = (int)((dt / 1000000000LL) % 1000000LL);
610
+ out->ps = (int)((dt / 1000LL) % 1000000LL);
611
+ out->as = (int)((dt % 1000LL) * 1000);
612
+ }
613
+ break;
614
+
615
+ case NPY_FR_as:
616
+ /* entire range is only +- 9.2 seconds */
617
+ if (dt >= 0) {
618
+ out->sec = (int)((dt / 1000000000000000000LL) % 60);
619
+ out->us = (int)((dt / 1000000000000LL) % 1000000LL);
620
+ out->ps = (int)((dt / 1000000LL) % 1000000LL);
621
+ out->as = (int)(dt % 1000000LL);
622
+ }
623
+ else {
624
+ npy_datetime seconds;
625
+
626
+ seconds = dt / 1000000000000000000LL;
627
+ dt = dt % 1000000000000000000LL;
628
+ if (dt < 0) {
629
+ dt += 1000000000000000000LL;
630
+ --seconds;
631
+ }
632
+ /* Offset the negative seconds */
633
+ add_seconds_to_datetimestruct(out, seconds);
634
+ out->us = (int)((dt / 1000000000000LL) % 1000000LL);
635
+ out->ps = (int)((dt / 1000000LL) % 1000000LL);
636
+ out->as = (int)(dt % 1000000LL);
637
+ }
638
+ break;
639
+
640
+ default:
641
+ PyErr_SetString(PyExc_RuntimeError,
642
+ "NumPy datetime metadata is corrupted with invalid "
643
+ "base unit");
644
+ return -1;
645
+ }
646
+
647
+ return 0;
648
+ }
649
+
650
+
651
+ /*NUMPY_API
652
+ * Fill the datetime struct from the value and resolution unit.
653
+ *
654
+ * TO BE REMOVED - NOT USED INTERNALLY.
655
+ */
656
+ NPY_NO_EXPORT void
657
+ PyArray_DatetimeToDatetimeStruct(npy_datetime val, NPY_DATETIMEUNIT fr,
658
+ npy_datetimestruct *result)
659
+ {
660
+ PyErr_SetString(PyExc_RuntimeError,
661
+ "The NumPy PyArray_DatetimeToDatetimeStruct function has "
662
+ "been removed");
663
+ memset(result, -1, sizeof(npy_datetimestruct));
664
+ }
665
+
666
+ /*
667
+ * FIXME: Overflow is not handled at all
668
+ * To convert from Years or Months,
669
+ * multiplication by the average is done
670
+ */
671
+
672
+ /*NUMPY_API
673
+ * Fill the timedelta struct from the timedelta value and resolution unit.
674
+ *
675
+ * TO BE REMOVED - NOT USED INTERNALLY.
676
+ */
677
+ NPY_NO_EXPORT void
678
+ PyArray_TimedeltaToTimedeltaStruct(npy_timedelta val, NPY_DATETIMEUNIT fr,
679
+ npy_timedeltastruct *result)
680
+ {
681
+ PyErr_SetString(PyExc_RuntimeError,
682
+ "The NumPy PyArray_TimedeltaToTimedeltaStruct function has "
683
+ "been removed");
684
+ memset(result, -1, sizeof(npy_timedeltastruct));
685
+ }
686
+
687
+ /*
688
+ * Creates a datetime or timedelta dtype using a copy of the provided metadata.
689
+ */
690
+ NPY_NO_EXPORT PyArray_Descr *
691
+ create_datetime_dtype(int type_num, PyArray_DatetimeMetaData *meta)
692
+ {
693
+ PyArray_Descr *dtype = NULL;
694
+ PyArray_DatetimeMetaData *dt_data;
695
+
696
+ /* Create a default datetime or timedelta */
697
+ if (type_num == NPY_DATETIME || type_num == NPY_TIMEDELTA) {
698
+ dtype = PyArray_DescrNewFromType(type_num);
699
+ }
700
+ else {
701
+ PyErr_SetString(PyExc_RuntimeError,
702
+ "Asked to create a datetime type with a non-datetime "
703
+ "type number");
704
+ return NULL;
705
+ }
706
+
707
+ if (dtype == NULL) {
708
+ return NULL;
709
+ }
710
+
711
+ dt_data = &(((PyArray_DatetimeDTypeMetaData *)dtype->c_metadata)->meta);
712
+
713
+ /* Copy the metadata */
714
+ *dt_data = *meta;
715
+
716
+ return dtype;
717
+ }
718
+
719
+ /*
720
+ * Creates a datetime or timedelta dtype using the given unit.
721
+ */
722
+ NPY_NO_EXPORT PyArray_Descr *
723
+ create_datetime_dtype_with_unit(int type_num, NPY_DATETIMEUNIT unit)
724
+ {
725
+ PyArray_DatetimeMetaData meta;
726
+ meta.base = unit;
727
+ meta.num = 1;
728
+ return create_datetime_dtype(type_num, &meta);
729
+ }
730
+
731
+ /*
732
+ * This function returns a pointer to the DateTimeMetaData
733
+ * contained within the provided datetime dtype.
734
+ */
735
+ NPY_NO_EXPORT PyArray_DatetimeMetaData *
736
+ get_datetime_metadata_from_dtype(PyArray_Descr *dtype)
737
+ {
738
+ if (!PyDataType_ISDATETIME(dtype)) {
739
+ PyErr_SetString(PyExc_TypeError,
740
+ "cannot get datetime metadata from non-datetime type");
741
+ return NULL;
742
+ }
743
+
744
+ return &(((PyArray_DatetimeDTypeMetaData *)dtype->c_metadata)->meta);
745
+ }
746
+
747
+ /*
748
+ * Converts a substring given by 'str' and 'len' into
749
+ * a date time unit multiplier + enum value, which are populated
750
+ * into out_meta. Other metadata is left along.
751
+ *
752
+ * 'metastr' is only used in the error message, and may be NULL.
753
+ *
754
+ * Returns 0 on success, -1 on failure.
755
+ */
756
+ NPY_NO_EXPORT int
757
+ parse_datetime_extended_unit_from_string(char *str, Py_ssize_t len,
758
+ char *metastr,
759
+ PyArray_DatetimeMetaData *out_meta)
760
+ {
761
+ char *substr = str, *substrend = NULL;
762
+ int den = 1;
763
+
764
+ /* First comes an optional integer multiplier */
765
+ out_meta->num = (int)strtol(substr, &substrend, 10);
766
+ if (substr == substrend) {
767
+ out_meta->num = 1;
768
+ }
769
+ substr = substrend;
770
+
771
+ /* Next comes the unit itself, followed by either '/' or the string end */
772
+ substrend = substr;
773
+ while (substrend-str < len && *substrend != '/') {
774
+ ++substrend;
775
+ }
776
+ if (substr == substrend) {
777
+ goto bad_input;
778
+ }
779
+ out_meta->base = parse_datetime_unit_from_string(substr,
780
+ substrend-substr, metastr);
781
+ if (out_meta->base == -1) {
782
+ return -1;
783
+ }
784
+ substr = substrend;
785
+
786
+ /* Next comes an optional integer denominator */
787
+ if (substr-str < len && *substr == '/') {
788
+ substr++;
789
+ den = (int)strtol(substr, &substrend, 10);
790
+ /* If the '/' exists, there must be a number followed by ']' */
791
+ if (substr == substrend || *substrend != ']') {
792
+ goto bad_input;
793
+ }
794
+ substr = substrend + 1;
795
+ }
796
+ else if (substr-str != len) {
797
+ goto bad_input;
798
+ }
799
+
800
+ if (den != 1) {
801
+ if (convert_datetime_divisor_to_multiple(
802
+ out_meta, den, metastr) < 0) {
803
+ return -1;
804
+ }
805
+ }
806
+
807
+ return 0;
808
+
809
+ bad_input:
810
+ if (metastr != NULL) {
811
+ PyErr_Format(PyExc_TypeError,
812
+ "Invalid datetime metadata string \"%s\" at position %d",
813
+ metastr, (int)(substr-metastr));
814
+ }
815
+ else {
816
+ PyErr_Format(PyExc_TypeError,
817
+ "Invalid datetime metadata string \"%s\"",
818
+ str);
819
+ }
820
+
821
+ return -1;
822
+ }
823
+
824
+ /*
825
+ * Parses the metadata string into the metadata C structure.
826
+ *
827
+ * Returns 0 on success, -1 on failure.
828
+ */
829
+ NPY_NO_EXPORT int
830
+ parse_datetime_metadata_from_metastr(char *metastr, Py_ssize_t len,
831
+ PyArray_DatetimeMetaData *out_meta)
832
+ {
833
+ char *substr = metastr, *substrend = NULL;
834
+
835
+ /* Treat the empty string as generic units */
836
+ if (len == 0) {
837
+ out_meta->base = NPY_FR_GENERIC;
838
+ out_meta->num = 1;
839
+
840
+ return 0;
841
+ }
842
+
843
+ /* The metadata string must start with a '[' */
844
+ if (len < 3 || *substr++ != '[') {
845
+ goto bad_input;
846
+ }
847
+
848
+ substrend = substr;
849
+ while (substrend - metastr < len && *substrend != ']') {
850
+ ++substrend;
851
+ }
852
+ if (substrend - metastr == len || substr == substrend) {
853
+ substr = substrend;
854
+ goto bad_input;
855
+ }
856
+
857
+ /* Parse the extended unit inside the [] */
858
+ if (parse_datetime_extended_unit_from_string(substr, substrend-substr,
859
+ metastr, out_meta) < 0) {
860
+ return -1;
861
+ }
862
+
863
+ substr = substrend+1;
864
+
865
+ if (substr - metastr != len) {
866
+ goto bad_input;
867
+ }
868
+
869
+ return 0;
870
+
871
+ bad_input:
872
+ if (substr != metastr) {
873
+ PyErr_Format(PyExc_TypeError,
874
+ "Invalid datetime metadata string \"%s\" at position %d",
875
+ metastr, (int)(substr-metastr));
876
+ }
877
+ else {
878
+ PyErr_Format(PyExc_TypeError,
879
+ "Invalid datetime metadata string \"%s\"",
880
+ metastr);
881
+ }
882
+
883
+ return -1;
884
+ }
885
+
886
+ /*
887
+ * Converts a datetype dtype string into a dtype descr object.
888
+ * The "type" string should be NULL-terminated.
889
+ */
890
+ NPY_NO_EXPORT PyArray_Descr *
891
+ parse_dtype_from_datetime_typestr(char *typestr, Py_ssize_t len)
892
+ {
893
+ PyArray_DatetimeMetaData meta;
894
+ char *metastr = NULL;
895
+ int is_timedelta = 0;
896
+ Py_ssize_t metalen = 0;
897
+
898
+ if (len < 2) {
899
+ PyErr_Format(PyExc_TypeError,
900
+ "Invalid datetime typestr \"%s\"",
901
+ typestr);
902
+ return NULL;
903
+ }
904
+
905
+ /*
906
+ * First validate that the root is correct,
907
+ * and get the metadata string address
908
+ */
909
+ if (typestr[0] == 'm' && typestr[1] == '8') {
910
+ is_timedelta = 1;
911
+ metastr = typestr + 2;
912
+ metalen = len - 2;
913
+ }
914
+ else if (typestr[0] == 'M' && typestr[1] == '8') {
915
+ is_timedelta = 0;
916
+ metastr = typestr + 2;
917
+ metalen = len - 2;
918
+ }
919
+ else if (len >= 11 && strncmp(typestr, "timedelta64", 11) == 0) {
920
+ is_timedelta = 1;
921
+ metastr = typestr + 11;
922
+ metalen = len - 11;
923
+ }
924
+ else if (len >= 10 && strncmp(typestr, "datetime64", 10) == 0) {
925
+ is_timedelta = 0;
926
+ metastr = typestr + 10;
927
+ metalen = len - 10;
928
+ }
929
+ else {
930
+ PyErr_Format(PyExc_TypeError,
931
+ "Invalid datetime typestr \"%s\"",
932
+ typestr);
933
+ return NULL;
934
+ }
935
+
936
+ /* Parse the metadata string into a metadata struct */
937
+ if (parse_datetime_metadata_from_metastr(metastr, metalen, &meta) < 0) {
938
+ return NULL;
939
+ }
940
+
941
+ return create_datetime_dtype(is_timedelta ? NPY_TIMEDELTA : NPY_DATETIME,
942
+ &meta);
943
+ }
944
+
945
+ static NPY_DATETIMEUNIT _multiples_table[16][4] = {
946
+ {12, 52, 365}, /* NPY_FR_Y */
947
+ {NPY_FR_M, NPY_FR_W, NPY_FR_D},
948
+ {4, 30, 720}, /* NPY_FR_M */
949
+ {NPY_FR_W, NPY_FR_D, NPY_FR_h},
950
+ {7, 168, 10080}, /* NPY_FR_W */
951
+ {NPY_FR_D, NPY_FR_h, NPY_FR_m},
952
+ {0}, /* Gap for removed NPY_FR_B */
953
+ {0},
954
+ {24, 1440, 86400}, /* NPY_FR_D */
955
+ {NPY_FR_h, NPY_FR_m, NPY_FR_s},
956
+ {60, 3600}, /* NPY_FR_h */
957
+ {NPY_FR_m, NPY_FR_s},
958
+ {60, 60000}, /* NPY_FR_m */
959
+ {NPY_FR_s, NPY_FR_ms},
960
+ {1000, 1000000}, /* >=NPY_FR_s */
961
+ {0, 0}
962
+ };
963
+
964
+
965
+
966
+ /*
967
+ * Translate divisors into multiples of smaller units.
968
+ * 'metastr' is used for the error message if the divisor doesn't work,
969
+ * and can be NULL if the metadata didn't come from a string.
970
+ *
971
+ * This function only affects the 'base' and 'num' values in the metadata.
972
+ *
973
+ * Returns 0 on success, -1 on failure.
974
+ */
975
+ NPY_NO_EXPORT int
976
+ convert_datetime_divisor_to_multiple(PyArray_DatetimeMetaData *meta,
977
+ int den, char *metastr)
978
+ {
979
+ int i, num, ind;
980
+ NPY_DATETIMEUNIT *totry;
981
+ NPY_DATETIMEUNIT *baseunit;
982
+ int q, r;
983
+
984
+ if (meta->base == NPY_FR_GENERIC) {
985
+ PyErr_SetString(PyExc_ValueError,
986
+ "Can't use 'den' divisor with generic units");
987
+ return -1;
988
+ }
989
+
990
+ ind = ((int)meta->base - (int)NPY_FR_Y)*2;
991
+ totry = _multiples_table[ind];
992
+ baseunit = _multiples_table[ind + 1];
993
+
994
+ num = 3;
995
+ if (meta->base == NPY_FR_W) {
996
+ num = 4;
997
+ }
998
+ else if (meta->base > NPY_FR_D) {
999
+ num = 2;
1000
+ }
1001
+ if (meta->base >= NPY_FR_s) {
1002
+ ind = ((int)NPY_FR_s - (int)NPY_FR_Y)*2;
1003
+ totry = _multiples_table[ind];
1004
+ baseunit = _multiples_table[ind + 1];
1005
+ baseunit[0] = meta->base + 1;
1006
+ baseunit[1] = meta->base + 2;
1007
+ if (meta->base == NPY_FR_as - 1) {
1008
+ num = 1;
1009
+ }
1010
+ if (meta->base == NPY_FR_as) {
1011
+ num = 0;
1012
+ }
1013
+ }
1014
+
1015
+ for (i = 0; i < num; i++) {
1016
+ q = totry[i] / den;
1017
+ r = totry[i] % den;
1018
+ if (r == 0) {
1019
+ break;
1020
+ }
1021
+ }
1022
+ if (i == num) {
1023
+ if (metastr == NULL) {
1024
+ PyErr_Format(PyExc_ValueError,
1025
+ "divisor (%d) is not a multiple of a lower-unit "
1026
+ "in datetime metadata", den);
1027
+ }
1028
+ else {
1029
+ PyErr_Format(PyExc_ValueError,
1030
+ "divisor (%d) is not a multiple of a lower-unit "
1031
+ "in datetime metadata \"%s\"", den, metastr);
1032
+ }
1033
+ return -1;
1034
+ }
1035
+ meta->base = baseunit[i];
1036
+ meta->num *= q;
1037
+
1038
+ return 0;
1039
+ }
1040
+
1041
+ /*
1042
+ * Lookup table for factors between datetime units, except
1043
+ * for years and months.
1044
+ */
1045
+ static npy_uint32
1046
+ _datetime_factors[] = {
1047
+ 1, /* Years - not used */
1048
+ 1, /* Months - not used */
1049
+ 7, /* Weeks -> Days */
1050
+ 1, /* Business Days - was removed but a gap still exists in the enum */
1051
+ 24, /* Days -> Hours */
1052
+ 60, /* Hours -> Minutes */
1053
+ 60, /* Minutes -> Seconds */
1054
+ 1000,
1055
+ 1000,
1056
+ 1000,
1057
+ 1000,
1058
+ 1000,
1059
+ 1000,
1060
+ 1, /* Attoseconds are the smallest base unit */
1061
+ 0 /* Generic units don't have a conversion */
1062
+ };
1063
+
1064
+ /*
1065
+ * Returns the scale factor between the units. Does not validate
1066
+ * that bigbase represents larger units than littlebase, or that
1067
+ * the units are not generic.
1068
+ *
1069
+ * Returns 0 if there is an overflow.
1070
+ */
1071
+ static npy_uint64
1072
+ get_datetime_units_factor(NPY_DATETIMEUNIT bigbase, NPY_DATETIMEUNIT littlebase)
1073
+ {
1074
+ npy_uint64 factor = 1;
1075
+ int unit = (int)bigbase;
1076
+ while (littlebase > unit) {
1077
+ factor *= _datetime_factors[unit];
1078
+ /*
1079
+ * Detect overflow by disallowing the top 16 bits to be 1.
1080
+ * That alows a margin of error much bigger than any of
1081
+ * the datetime factors.
1082
+ */
1083
+ if (factor&0xff00000000000000ULL) {
1084
+ return 0;
1085
+ }
1086
+ ++unit;
1087
+ }
1088
+ return factor;
1089
+ }
1090
+
1091
+ /* Euclidean algorithm on two positive numbers */
1092
+ static npy_uint64
1093
+ _uint64_euclidean_gcd(npy_uint64 x, npy_uint64 y)
1094
+ {
1095
+ npy_uint64 tmp;
1096
+
1097
+ if (x > y) {
1098
+ tmp = x;
1099
+ x = y;
1100
+ y = tmp;
1101
+ }
1102
+ while (x != y && y != 0) {
1103
+ tmp = x % y;
1104
+ x = y;
1105
+ y = tmp;
1106
+ }
1107
+
1108
+ return x;
1109
+ }
1110
+
1111
+ /*
1112
+ * Computes the conversion factor to convert data with 'src_meta' metadata
1113
+ * into data with 'dst_meta' metadata.
1114
+ *
1115
+ * If overflow occurs, both out_num and out_denom are set to 0, but
1116
+ * no error is set.
1117
+ */
1118
+ NPY_NO_EXPORT void
1119
+ get_datetime_conversion_factor(PyArray_DatetimeMetaData *src_meta,
1120
+ PyArray_DatetimeMetaData *dst_meta,
1121
+ npy_int64 *out_num, npy_int64 *out_denom)
1122
+ {
1123
+ int src_base, dst_base, swapped;
1124
+ npy_uint64 num = 1, denom = 1, tmp, gcd;
1125
+
1126
+ /* Generic units change to the destination with no conversion factor */
1127
+ if (src_meta->base == NPY_FR_GENERIC) {
1128
+ *out_num = 1;
1129
+ *out_denom = 1;
1130
+ return;
1131
+ }
1132
+ /*
1133
+ * Converting to a generic unit from something other than a generic
1134
+ * unit is an error.
1135
+ */
1136
+ else if (dst_meta->base == NPY_FR_GENERIC) {
1137
+ PyErr_SetString(PyExc_ValueError,
1138
+ "Cannot convert from specific units to generic "
1139
+ "units in NumPy datetimes or timedeltas");
1140
+ *out_num = 0;
1141
+ *out_denom = 0;
1142
+ return;
1143
+ }
1144
+
1145
+ if (src_meta->base <= dst_meta->base) {
1146
+ src_base = src_meta->base;
1147
+ dst_base = dst_meta->base;
1148
+ swapped = 0;
1149
+ }
1150
+ else {
1151
+ src_base = dst_meta->base;
1152
+ dst_base = src_meta->base;
1153
+ swapped = 1;
1154
+ }
1155
+
1156
+ if (src_base != dst_base) {
1157
+ /*
1158
+ * Conversions between years/months and other units use
1159
+ * the factor averaged over the 400 year leap year cycle.
1160
+ */
1161
+ if (src_base == NPY_FR_Y) {
1162
+ if (dst_base == NPY_FR_M) {
1163
+ num *= 12;
1164
+ }
1165
+ else if (dst_base == NPY_FR_W) {
1166
+ num *= (97 + 400*365);
1167
+ denom *= 400*7;
1168
+ }
1169
+ else {
1170
+ /* Year -> Day */
1171
+ num *= (97 + 400*365);
1172
+ denom *= 400;
1173
+ /* Day -> dst_base */
1174
+ num *= get_datetime_units_factor(NPY_FR_D, dst_base);
1175
+ }
1176
+ }
1177
+ else if (src_base == NPY_FR_M) {
1178
+ if (dst_base == NPY_FR_W) {
1179
+ num *= (97 + 400*365);
1180
+ denom *= 400*12*7;
1181
+ }
1182
+ else {
1183
+ /* Month -> Day */
1184
+ num *= (97 + 400*365);
1185
+ denom *= 400*12;
1186
+ /* Day -> dst_base */
1187
+ num *= get_datetime_units_factor(NPY_FR_D, dst_base);
1188
+ }
1189
+ }
1190
+ else {
1191
+ num *= get_datetime_units_factor(src_base, dst_base);
1192
+ }
1193
+ }
1194
+
1195
+ /* If something overflowed, make both num and denom 0 */
1196
+ if (denom == 0 || num == 0) {
1197
+ PyErr_Format(PyExc_OverflowError,
1198
+ "Integer overflow while computing the conversion "
1199
+ "factor between NumPy datetime units %s and %s",
1200
+ _datetime_strings[src_base],
1201
+ _datetime_strings[dst_base]);
1202
+ *out_num = 0;
1203
+ *out_denom = 0;
1204
+ return;
1205
+ }
1206
+
1207
+ /* Swap the numerator and denominator if necessary */
1208
+ if (swapped) {
1209
+ tmp = num;
1210
+ num = denom;
1211
+ denom = tmp;
1212
+ }
1213
+
1214
+ num *= src_meta->num;
1215
+ denom *= dst_meta->num;
1216
+
1217
+ /* Return as a fraction in reduced form */
1218
+ gcd = _uint64_euclidean_gcd(num, denom);
1219
+ *out_num = (npy_int64)(num / gcd);
1220
+ *out_denom = (npy_int64)(denom / gcd);
1221
+ }
1222
+
1223
+ /*
1224
+ * Determines whether the 'divisor' metadata divides evenly into
1225
+ * the 'dividend' metadata.
1226
+ */
1227
+ NPY_NO_EXPORT npy_bool
1228
+ datetime_metadata_divides(
1229
+ PyArray_DatetimeMetaData *dividend,
1230
+ PyArray_DatetimeMetaData *divisor,
1231
+ int strict_with_nonlinear_units)
1232
+ {
1233
+ npy_uint64 num1, num2;
1234
+
1235
+ /* Generic units divide into anything */
1236
+ if (divisor->base == NPY_FR_GENERIC) {
1237
+ return 1;
1238
+ }
1239
+ /* Non-generic units never divide into generic units */
1240
+ else if (dividend->base == NPY_FR_GENERIC) {
1241
+ return 0;
1242
+ }
1243
+
1244
+ num1 = (npy_uint64)dividend->num;
1245
+ num2 = (npy_uint64)divisor->num;
1246
+
1247
+ /* If the bases are different, factor in a conversion */
1248
+ if (dividend->base != divisor->base) {
1249
+ /*
1250
+ * Years and Months are incompatible with
1251
+ * all other units (except years and months are compatible
1252
+ * with each other).
1253
+ */
1254
+ if (dividend->base == NPY_FR_Y) {
1255
+ if (divisor->base == NPY_FR_M) {
1256
+ num1 *= 12;
1257
+ }
1258
+ else if (strict_with_nonlinear_units) {
1259
+ return 0;
1260
+ }
1261
+ else {
1262
+ /* Could do something complicated here */
1263
+ return 1;
1264
+ }
1265
+ }
1266
+ else if (divisor->base == NPY_FR_Y) {
1267
+ if (dividend->base == NPY_FR_M) {
1268
+ num2 *= 12;
1269
+ }
1270
+ else if (strict_with_nonlinear_units) {
1271
+ return 0;
1272
+ }
1273
+ else {
1274
+ /* Could do something complicated here */
1275
+ return 1;
1276
+ }
1277
+ }
1278
+ else if (dividend->base == NPY_FR_M || divisor->base == NPY_FR_M) {
1279
+ if (strict_with_nonlinear_units) {
1280
+ return 0;
1281
+ }
1282
+ else {
1283
+ /* Could do something complicated here */
1284
+ return 1;
1285
+ }
1286
+ }
1287
+
1288
+ /* Take the greater base (unit sizes are decreasing in enum) */
1289
+ if (dividend->base > divisor->base) {
1290
+ num2 *= get_datetime_units_factor(divisor->base, dividend->base);
1291
+ if (num2 == 0) {
1292
+ return 0;
1293
+ }
1294
+ }
1295
+ else {
1296
+ num1 *= get_datetime_units_factor(dividend->base, divisor->base);
1297
+ if (num1 == 0) {
1298
+ return 0;
1299
+ }
1300
+ }
1301
+ }
1302
+
1303
+ /* Crude, incomplete check for overflow */
1304
+ if (num1&0xff00000000000000LL || num2&0xff00000000000000LL ) {
1305
+ return 0;
1306
+ }
1307
+
1308
+ return (num1 % num2) == 0;
1309
+ }
1310
+
1311
+ /*
1312
+ * This provides the casting rules for the DATETIME data type units.
1313
+ *
1314
+ * Notably, there is a barrier between 'date units' and 'time units'
1315
+ * for all but 'unsafe' casting.
1316
+ */
1317
+ NPY_NO_EXPORT npy_bool
1318
+ can_cast_datetime64_units(NPY_DATETIMEUNIT src_unit,
1319
+ NPY_DATETIMEUNIT dst_unit,
1320
+ NPY_CASTING casting)
1321
+ {
1322
+ switch (casting) {
1323
+ /* Allow anything with unsafe casting */
1324
+ case NPY_UNSAFE_CASTING:
1325
+ return 1;
1326
+
1327
+ /*
1328
+ * Only enforce the 'date units' vs 'time units' barrier with
1329
+ * 'same_kind' casting.
1330
+ */
1331
+ case NPY_SAME_KIND_CASTING:
1332
+ if (src_unit == NPY_FR_GENERIC || dst_unit == NPY_FR_GENERIC) {
1333
+ return src_unit == dst_unit;
1334
+ }
1335
+ else {
1336
+ return (src_unit <= NPY_FR_D && dst_unit <= NPY_FR_D) ||
1337
+ (src_unit > NPY_FR_D && dst_unit > NPY_FR_D);
1338
+ }
1339
+
1340
+ /*
1341
+ * Enforce the 'date units' vs 'time units' barrier and that
1342
+ * casting is only allowed towards more precise units with
1343
+ * 'safe' casting.
1344
+ */
1345
+ case NPY_SAFE_CASTING:
1346
+ if (src_unit == NPY_FR_GENERIC || dst_unit == NPY_FR_GENERIC) {
1347
+ return src_unit == dst_unit;
1348
+ }
1349
+ else {
1350
+ return (src_unit <= dst_unit) &&
1351
+ ((src_unit <= NPY_FR_D && dst_unit <= NPY_FR_D) ||
1352
+ (src_unit > NPY_FR_D && dst_unit > NPY_FR_D));
1353
+ }
1354
+
1355
+ /* Enforce equality with 'no' or 'equiv' casting */
1356
+ default:
1357
+ return src_unit == dst_unit;
1358
+ }
1359
+ }
1360
+
1361
+ /*
1362
+ * This provides the casting rules for the TIMEDELTA data type units.
1363
+ *
1364
+ * Notably, there is a barrier between the nonlinear years and
1365
+ * months units, and all the other units.
1366
+ */
1367
+ NPY_NO_EXPORT npy_bool
1368
+ can_cast_timedelta64_units(NPY_DATETIMEUNIT src_unit,
1369
+ NPY_DATETIMEUNIT dst_unit,
1370
+ NPY_CASTING casting)
1371
+ {
1372
+ switch (casting) {
1373
+ /* Allow anything with unsafe casting */
1374
+ case NPY_UNSAFE_CASTING:
1375
+ return 1;
1376
+
1377
+ /*
1378
+ * Only enforce the 'date units' vs 'time units' barrier with
1379
+ * 'same_kind' casting.
1380
+ */
1381
+ case NPY_SAME_KIND_CASTING:
1382
+ if (src_unit == NPY_FR_GENERIC || dst_unit == NPY_FR_GENERIC) {
1383
+ return src_unit == dst_unit;
1384
+ }
1385
+ else {
1386
+ return (src_unit <= NPY_FR_M && dst_unit <= NPY_FR_M) ||
1387
+ (src_unit > NPY_FR_M && dst_unit > NPY_FR_M);
1388
+ }
1389
+
1390
+ /*
1391
+ * Enforce the 'date units' vs 'time units' barrier and that
1392
+ * casting is only allowed towards more precise units with
1393
+ * 'safe' casting.
1394
+ */
1395
+ case NPY_SAFE_CASTING:
1396
+ if (src_unit == NPY_FR_GENERIC || dst_unit == NPY_FR_GENERIC) {
1397
+ return src_unit == dst_unit;
1398
+ }
1399
+ else {
1400
+ return (src_unit <= dst_unit) &&
1401
+ ((src_unit <= NPY_FR_M && dst_unit <= NPY_FR_M) ||
1402
+ (src_unit > NPY_FR_M && dst_unit > NPY_FR_M));
1403
+ }
1404
+
1405
+ /* Enforce equality with 'no' or 'equiv' casting */
1406
+ default:
1407
+ return src_unit == dst_unit;
1408
+ }
1409
+ }
1410
+
1411
+ /*
1412
+ * This provides the casting rules for the DATETIME data type metadata.
1413
+ */
1414
+ NPY_NO_EXPORT npy_bool
1415
+ can_cast_datetime64_metadata(PyArray_DatetimeMetaData *src_meta,
1416
+ PyArray_DatetimeMetaData *dst_meta,
1417
+ NPY_CASTING casting)
1418
+ {
1419
+ switch (casting) {
1420
+ case NPY_UNSAFE_CASTING:
1421
+ return 1;
1422
+
1423
+ case NPY_SAME_KIND_CASTING:
1424
+ return can_cast_datetime64_units(src_meta->base, dst_meta->base,
1425
+ casting);
1426
+
1427
+ case NPY_SAFE_CASTING:
1428
+ return can_cast_datetime64_units(src_meta->base, dst_meta->base,
1429
+ casting) &&
1430
+ datetime_metadata_divides(src_meta, dst_meta, 0);
1431
+
1432
+ default:
1433
+ return src_meta->base == dst_meta->base &&
1434
+ src_meta->num == dst_meta->num;
1435
+ }
1436
+ }
1437
+
1438
+ /*
1439
+ * This provides the casting rules for the TIMEDELTA data type metadata.
1440
+ */
1441
+ NPY_NO_EXPORT npy_bool
1442
+ can_cast_timedelta64_metadata(PyArray_DatetimeMetaData *src_meta,
1443
+ PyArray_DatetimeMetaData *dst_meta,
1444
+ NPY_CASTING casting)
1445
+ {
1446
+ switch (casting) {
1447
+ case NPY_UNSAFE_CASTING:
1448
+ return 1;
1449
+
1450
+ case NPY_SAME_KIND_CASTING:
1451
+ return can_cast_timedelta64_units(src_meta->base, dst_meta->base,
1452
+ casting);
1453
+
1454
+ case NPY_SAFE_CASTING:
1455
+ return can_cast_timedelta64_units(src_meta->base, dst_meta->base,
1456
+ casting) &&
1457
+ datetime_metadata_divides(src_meta, dst_meta, 1);
1458
+
1459
+ default:
1460
+ return src_meta->base == dst_meta->base &&
1461
+ src_meta->num == dst_meta->num;
1462
+ }
1463
+ }
1464
+
1465
+ /*
1466
+ * Tests whether a datetime64 can be cast from the source metadata
1467
+ * to the destination metadata according to the specified casting rule.
1468
+ *
1469
+ * Returns -1 if an exception was raised, 0 otherwise.
1470
+ */
1471
+ NPY_NO_EXPORT int
1472
+ raise_if_datetime64_metadata_cast_error(char *object_type,
1473
+ PyArray_DatetimeMetaData *src_meta,
1474
+ PyArray_DatetimeMetaData *dst_meta,
1475
+ NPY_CASTING casting)
1476
+ {
1477
+ if (can_cast_datetime64_metadata(src_meta, dst_meta, casting)) {
1478
+ return 0;
1479
+ }
1480
+ else {
1481
+ PyObject *errmsg;
1482
+ errmsg = PyUString_FromFormat("Cannot cast %s "
1483
+ "from metadata ", object_type);
1484
+ errmsg = append_metastr_to_string(src_meta, 0, errmsg);
1485
+ PyUString_ConcatAndDel(&errmsg,
1486
+ PyUString_FromString(" to "));
1487
+ errmsg = append_metastr_to_string(dst_meta, 0, errmsg);
1488
+ PyUString_ConcatAndDel(&errmsg,
1489
+ PyUString_FromFormat(" according to the rule %s",
1490
+ npy_casting_to_string(casting)));
1491
+ PyErr_SetObject(PyExc_TypeError, errmsg);
1492
+ Py_DECREF(errmsg);
1493
+ return -1;
1494
+ }
1495
+ }
1496
+
1497
+ /*
1498
+ * Tests whether a timedelta64 can be cast from the source metadata
1499
+ * to the destination metadata according to the specified casting rule.
1500
+ *
1501
+ * Returns -1 if an exception was raised, 0 otherwise.
1502
+ */
1503
+ NPY_NO_EXPORT int
1504
+ raise_if_timedelta64_metadata_cast_error(char *object_type,
1505
+ PyArray_DatetimeMetaData *src_meta,
1506
+ PyArray_DatetimeMetaData *dst_meta,
1507
+ NPY_CASTING casting)
1508
+ {
1509
+ if (can_cast_timedelta64_metadata(src_meta, dst_meta, casting)) {
1510
+ return 0;
1511
+ }
1512
+ else {
1513
+ PyObject *errmsg;
1514
+ errmsg = PyUString_FromFormat("Cannot cast %s "
1515
+ "from metadata ", object_type);
1516
+ errmsg = append_metastr_to_string(src_meta, 0, errmsg);
1517
+ PyUString_ConcatAndDel(&errmsg,
1518
+ PyUString_FromString(" to "));
1519
+ errmsg = append_metastr_to_string(dst_meta, 0, errmsg);
1520
+ PyUString_ConcatAndDel(&errmsg,
1521
+ PyUString_FromFormat(" according to the rule %s",
1522
+ npy_casting_to_string(casting)));
1523
+ PyErr_SetObject(PyExc_TypeError, errmsg);
1524
+ Py_DECREF(errmsg);
1525
+ return -1;
1526
+ }
1527
+ }
1528
+
1529
+ /*
1530
+ * Computes the GCD of the two date-time metadata values. Raises
1531
+ * an exception if there is no reasonable GCD, such as with
1532
+ * years and days.
1533
+ *
1534
+ * The result is placed in 'out_meta'.
1535
+ *
1536
+ * Returns 0 on success, -1 on failure.
1537
+ */
1538
+ NPY_NO_EXPORT int
1539
+ compute_datetime_metadata_greatest_common_divisor(
1540
+ PyArray_DatetimeMetaData *meta1,
1541
+ PyArray_DatetimeMetaData *meta2,
1542
+ PyArray_DatetimeMetaData *out_meta,
1543
+ int strict_with_nonlinear_units1,
1544
+ int strict_with_nonlinear_units2)
1545
+ {
1546
+ NPY_DATETIMEUNIT base;
1547
+ npy_uint64 num1, num2, num;
1548
+
1549
+ /* If either unit is generic, adopt the metadata from the other one */
1550
+ if (meta1->base == NPY_FR_GENERIC) {
1551
+ *out_meta = *meta2;
1552
+ return 0;
1553
+ }
1554
+ else if (meta2->base == NPY_FR_GENERIC) {
1555
+ *out_meta = *meta1;
1556
+ return 0;
1557
+ }
1558
+
1559
+ num1 = (npy_uint64)meta1->num;
1560
+ num2 = (npy_uint64)meta2->num;
1561
+
1562
+ /* First validate that the units have a reasonable GCD */
1563
+ if (meta1->base == meta2->base) {
1564
+ base = meta1->base;
1565
+ }
1566
+ else {
1567
+ /*
1568
+ * Years and Months are incompatible with
1569
+ * all other units (except years and months are compatible
1570
+ * with each other).
1571
+ */
1572
+ if (meta1->base == NPY_FR_Y) {
1573
+ if (meta2->base == NPY_FR_M) {
1574
+ base = NPY_FR_M;
1575
+ num1 *= 12;
1576
+ }
1577
+ else if (strict_with_nonlinear_units1) {
1578
+ goto incompatible_units;
1579
+ }
1580
+ else {
1581
+ base = meta2->base;
1582
+ /* Don't multiply num1 since there is no even factor */
1583
+ }
1584
+ }
1585
+ else if (meta2->base == NPY_FR_Y) {
1586
+ if (meta1->base == NPY_FR_M) {
1587
+ base = NPY_FR_M;
1588
+ num2 *= 12;
1589
+ }
1590
+ else if (strict_with_nonlinear_units2) {
1591
+ goto incompatible_units;
1592
+ }
1593
+ else {
1594
+ base = meta1->base;
1595
+ /* Don't multiply num2 since there is no even factor */
1596
+ }
1597
+ }
1598
+ else if (meta1->base == NPY_FR_M) {
1599
+ if (strict_with_nonlinear_units1) {
1600
+ goto incompatible_units;
1601
+ }
1602
+ else {
1603
+ base = meta2->base;
1604
+ /* Don't multiply num1 since there is no even factor */
1605
+ }
1606
+ }
1607
+ else if (meta2->base == NPY_FR_M) {
1608
+ if (strict_with_nonlinear_units2) {
1609
+ goto incompatible_units;
1610
+ }
1611
+ else {
1612
+ base = meta1->base;
1613
+ /* Don't multiply num2 since there is no even factor */
1614
+ }
1615
+ }
1616
+
1617
+ /* Take the greater base (unit sizes are decreasing in enum) */
1618
+ if (meta1->base > meta2->base) {
1619
+ base = meta1->base;
1620
+ num2 *= get_datetime_units_factor(meta2->base, meta1->base);
1621
+ if (num2 == 0) {
1622
+ goto units_overflow;
1623
+ }
1624
+ }
1625
+ else {
1626
+ base = meta2->base;
1627
+ num1 *= get_datetime_units_factor(meta1->base, meta2->base);
1628
+ if (num1 == 0) {
1629
+ goto units_overflow;
1630
+ }
1631
+ }
1632
+ }
1633
+
1634
+ /* Compute the GCD of the resulting multipliers */
1635
+ num = _uint64_euclidean_gcd(num1, num2);
1636
+
1637
+ /* Fill the 'out_meta' values */
1638
+ out_meta->base = base;
1639
+ out_meta->num = (int)num;
1640
+ if (out_meta->num <= 0 || num != (npy_uint64)out_meta->num) {
1641
+ goto units_overflow;
1642
+ }
1643
+
1644
+ return 0;
1645
+
1646
+ incompatible_units: {
1647
+ PyObject *errmsg;
1648
+ errmsg = PyUString_FromString("Cannot get "
1649
+ "a common metadata divisor for "
1650
+ "NumPy datetime metadata ");
1651
+ errmsg = append_metastr_to_string(meta1, 0, errmsg);
1652
+ PyUString_ConcatAndDel(&errmsg,
1653
+ PyUString_FromString(" and "));
1654
+ errmsg = append_metastr_to_string(meta2, 0, errmsg);
1655
+ PyUString_ConcatAndDel(&errmsg,
1656
+ PyUString_FromString(" because they have "
1657
+ "incompatible nonlinear base time units"));
1658
+ PyErr_SetObject(PyExc_TypeError, errmsg);
1659
+ Py_DECREF(errmsg);
1660
+ return -1;
1661
+ }
1662
+ units_overflow: {
1663
+ PyObject *errmsg;
1664
+ errmsg = PyUString_FromString("Integer overflow "
1665
+ "getting a common metadata divisor for "
1666
+ "NumPy datetime metadata ");
1667
+ errmsg = append_metastr_to_string(meta1, 0, errmsg);
1668
+ PyUString_ConcatAndDel(&errmsg,
1669
+ PyUString_FromString(" and "));
1670
+ errmsg = append_metastr_to_string(meta2, 0, errmsg);
1671
+ PyErr_SetObject(PyExc_OverflowError, errmsg);
1672
+ Py_DECREF(errmsg);
1673
+ return -1;
1674
+ }
1675
+ }
1676
+
1677
+ /*
1678
+ * Both type1 and type2 must be either NPY_DATETIME or NPY_TIMEDELTA.
1679
+ * Applies the type promotion rules between the two types, returning
1680
+ * the promoted type.
1681
+ */
1682
+ NPY_NO_EXPORT PyArray_Descr *
1683
+ datetime_type_promotion(PyArray_Descr *type1, PyArray_Descr *type2)
1684
+ {
1685
+ int type_num1, type_num2;
1686
+ PyArray_Descr *dtype;
1687
+ int is_datetime;
1688
+
1689
+ type_num1 = type1->type_num;
1690
+ type_num2 = type2->type_num;
1691
+
1692
+ is_datetime = (type_num1 == NPY_DATETIME || type_num2 == NPY_DATETIME);
1693
+
1694
+ /* Create a DATETIME or TIMEDELTA dtype */
1695
+ dtype = PyArray_DescrNewFromType(is_datetime ? NPY_DATETIME :
1696
+ NPY_TIMEDELTA);
1697
+ if (dtype == NULL) {
1698
+ return NULL;
1699
+ }
1700
+
1701
+ /*
1702
+ * Get the metadata GCD, being strict about nonlinear units for
1703
+ * timedelta and relaxed for datetime.
1704
+ */
1705
+ if (compute_datetime_metadata_greatest_common_divisor(
1706
+ get_datetime_metadata_from_dtype(type1),
1707
+ get_datetime_metadata_from_dtype(type2),
1708
+ get_datetime_metadata_from_dtype(dtype),
1709
+ type_num1 == NPY_TIMEDELTA,
1710
+ type_num2 == NPY_TIMEDELTA) < 0) {
1711
+ Py_DECREF(dtype);
1712
+ return NULL;
1713
+ }
1714
+
1715
+ return dtype;
1716
+ }
1717
+
1718
+ /*
1719
+ * Converts a substring given by 'str' and 'len' into
1720
+ * a date time unit enum value. The 'metastr' parameter
1721
+ * is used for error messages, and may be NULL.
1722
+ *
1723
+ * Generic units have no representation as a string in this form.
1724
+ *
1725
+ * Returns 0 on success, -1 on failure.
1726
+ */
1727
+ NPY_NO_EXPORT NPY_DATETIMEUNIT
1728
+ parse_datetime_unit_from_string(char *str, Py_ssize_t len, char *metastr)
1729
+ {
1730
+ /* Use switch statements so the compiler can make it fast */
1731
+ if (len == 1) {
1732
+ switch (str[0]) {
1733
+ case 'Y':
1734
+ return NPY_FR_Y;
1735
+ case 'M':
1736
+ return NPY_FR_M;
1737
+ case 'W':
1738
+ return NPY_FR_W;
1739
+ case 'D':
1740
+ return NPY_FR_D;
1741
+ case 'h':
1742
+ return NPY_FR_h;
1743
+ case 'm':
1744
+ return NPY_FR_m;
1745
+ case 's':
1746
+ return NPY_FR_s;
1747
+ }
1748
+ }
1749
+ /* All the two-letter units are variants of seconds */
1750
+ else if (len == 2 && str[1] == 's') {
1751
+ switch (str[0]) {
1752
+ case 'm':
1753
+ return NPY_FR_ms;
1754
+ case 'u':
1755
+ return NPY_FR_us;
1756
+ case 'n':
1757
+ return NPY_FR_ns;
1758
+ case 'p':
1759
+ return NPY_FR_ps;
1760
+ case 'f':
1761
+ return NPY_FR_fs;
1762
+ case 'a':
1763
+ return NPY_FR_as;
1764
+ }
1765
+ }
1766
+
1767
+ /* If nothing matched, it's an error */
1768
+ if (metastr == NULL) {
1769
+ PyErr_Format(PyExc_TypeError,
1770
+ "Invalid datetime unit \"%s\" in metadata",
1771
+ str);
1772
+ }
1773
+ else {
1774
+ PyErr_Format(PyExc_TypeError,
1775
+ "Invalid datetime unit in metadata string \"%s\"",
1776
+ metastr);
1777
+ }
1778
+ return -1;
1779
+ }
1780
+
1781
+
1782
+ NPY_NO_EXPORT PyObject *
1783
+ convert_datetime_metadata_to_tuple(PyArray_DatetimeMetaData *meta)
1784
+ {
1785
+ PyObject *dt_tuple;
1786
+
1787
+ dt_tuple = PyTuple_New(2);
1788
+ if (dt_tuple == NULL) {
1789
+ return NULL;
1790
+ }
1791
+
1792
+ PyTuple_SET_ITEM(dt_tuple, 0,
1793
+ PyUString_FromString(_datetime_strings[meta->base]));
1794
+ PyTuple_SET_ITEM(dt_tuple, 1,
1795
+ PyInt_FromLong(meta->num));
1796
+
1797
+ return dt_tuple;
1798
+ }
1799
+
1800
+ /*
1801
+ * Converts a metadata tuple into a datetime metadata C struct.
1802
+ *
1803
+ * Returns 0 on success, -1 on failure.
1804
+ */
1805
+ NPY_NO_EXPORT int
1806
+ convert_datetime_metadata_tuple_to_datetime_metadata(PyObject *tuple,
1807
+ PyArray_DatetimeMetaData *out_meta)
1808
+ {
1809
+ char *basestr = NULL;
1810
+ Py_ssize_t len = 0, tuple_size;
1811
+ int den = 1;
1812
+ PyObject *unit_str = NULL;
1813
+
1814
+ if (!PyTuple_Check(tuple)) {
1815
+ PyObject *errmsg;
1816
+ errmsg = PyUString_FromString("Require tuple for tuple to NumPy "
1817
+ "datetime metadata conversion, not ");
1818
+ PyUString_ConcatAndDel(&errmsg, PyObject_Repr(tuple));
1819
+ PyErr_SetObject(PyExc_TypeError, errmsg);
1820
+ Py_DECREF(errmsg);
1821
+ return -1;
1822
+ }
1823
+
1824
+ tuple_size = PyTuple_GET_SIZE(tuple);
1825
+ if (tuple_size < 2 || tuple_size > 4) {
1826
+ PyErr_SetString(PyExc_TypeError,
1827
+ "Require tuple of size 2 to 4 for "
1828
+ "tuple to NumPy datetime metadata conversion");
1829
+ return -1;
1830
+ }
1831
+
1832
+ unit_str = PyTuple_GET_ITEM(tuple, 0);
1833
+ Py_INCREF(unit_str);
1834
+ if (PyUnicode_Check(unit_str)) {
1835
+ /* Allow unicode format strings: convert to bytes */
1836
+ PyObject *tmp = PyUnicode_AsASCIIString(unit_str);
1837
+ Py_DECREF(unit_str);
1838
+ if (tmp == NULL) {
1839
+ return -1;
1840
+ }
1841
+ unit_str = tmp;
1842
+ }
1843
+ if (PyBytes_AsStringAndSize(unit_str, &basestr, &len) < 0) {
1844
+ Py_DECREF(unit_str);
1845
+ return -1;
1846
+ }
1847
+
1848
+ out_meta->base = parse_datetime_unit_from_string(basestr, len, NULL);
1849
+ if (out_meta->base == -1) {
1850
+ Py_DECREF(unit_str);
1851
+ return -1;
1852
+ }
1853
+
1854
+ Py_DECREF(unit_str);
1855
+
1856
+ /* Convert the values to longs */
1857
+ out_meta->num = PyInt_AsLong(PyTuple_GET_ITEM(tuple, 1));
1858
+ if (out_meta->num == -1 && PyErr_Occurred()) {
1859
+ return -1;
1860
+ }
1861
+
1862
+ if (tuple_size == 4) {
1863
+ den = PyInt_AsLong(PyTuple_GET_ITEM(tuple, 2));
1864
+ if (den == -1 && PyErr_Occurred()) {
1865
+ return -1;
1866
+ }
1867
+ }
1868
+
1869
+ if (out_meta->num <= 0 || den <= 0) {
1870
+ PyErr_SetString(PyExc_TypeError,
1871
+ "Invalid tuple values for "
1872
+ "tuple to NumPy datetime metadata conversion");
1873
+ return -1;
1874
+ }
1875
+
1876
+ if (den != 1) {
1877
+ if (convert_datetime_divisor_to_multiple(out_meta, den, NULL) < 0) {
1878
+ return -1;
1879
+ }
1880
+ }
1881
+
1882
+ return 0;
1883
+ }
1884
+
1885
+ /*
1886
+ * Converts an input object into datetime metadata. The input
1887
+ * may be either a string or a tuple.
1888
+ *
1889
+ * Returns 0 on success, -1 on failure.
1890
+ */
1891
+ NPY_NO_EXPORT int
1892
+ convert_pyobject_to_datetime_metadata(PyObject *obj,
1893
+ PyArray_DatetimeMetaData *out_meta)
1894
+ {
1895
+ PyObject *ascii = NULL;
1896
+ char *str = NULL;
1897
+ Py_ssize_t len = 0;
1898
+
1899
+ if (PyTuple_Check(obj)) {
1900
+ return convert_datetime_metadata_tuple_to_datetime_metadata(obj,
1901
+ out_meta);
1902
+ }
1903
+
1904
+ /* Get an ASCII string */
1905
+ if (PyUnicode_Check(obj)) {
1906
+ /* Allow unicode format strings: convert to bytes */
1907
+ ascii = PyUnicode_AsASCIIString(obj);
1908
+ if (ascii == NULL) {
1909
+ return -1;
1910
+ }
1911
+ }
1912
+ else if (PyBytes_Check(obj)) {
1913
+ ascii = obj;
1914
+ Py_INCREF(ascii);
1915
+ }
1916
+ else {
1917
+ PyErr_SetString(PyExc_TypeError,
1918
+ "Invalid object for specifying NumPy datetime metadata");
1919
+ return -1;
1920
+ }
1921
+
1922
+ if (PyBytes_AsStringAndSize(ascii, &str, &len) < 0) {
1923
+ Py_DECREF(ascii);
1924
+ return -1;
1925
+ }
1926
+
1927
+ if (len > 0 && str[0] == '[') {
1928
+ int r = parse_datetime_metadata_from_metastr(str, len, out_meta);
1929
+ Py_DECREF(ascii);
1930
+ return r;
1931
+ }
1932
+ else {
1933
+ if (parse_datetime_extended_unit_from_string(str, len,
1934
+ NULL, out_meta) < 0) {
1935
+ Py_DECREF(ascii);
1936
+ return -1;
1937
+ }
1938
+
1939
+ Py_DECREF(ascii);
1940
+ return 0;
1941
+ }
1942
+ }
1943
+
1944
+ /*
1945
+ * 'ret' is a PyUString containing the datetime string, and this
1946
+ * function appends the metadata string to it.
1947
+ *
1948
+ * If 'skip_brackets' is true, skips the '[]'.
1949
+ *
1950
+ * This function steals the reference 'ret'
1951
+ */
1952
+ NPY_NO_EXPORT PyObject *
1953
+ append_metastr_to_string(PyArray_DatetimeMetaData *meta,
1954
+ int skip_brackets,
1955
+ PyObject *ret)
1956
+ {
1957
+ PyObject *res;
1958
+ int num;
1959
+ char *basestr;
1960
+
1961
+ if (ret == NULL) {
1962
+ return NULL;
1963
+ }
1964
+
1965
+ if (meta->base == NPY_FR_GENERIC) {
1966
+ /* Without brackets, give a string "generic" */
1967
+ if (skip_brackets) {
1968
+ PyUString_ConcatAndDel(&ret, PyUString_FromString("generic"));
1969
+ return ret;
1970
+ }
1971
+ /* But with brackets, append nothing */
1972
+ else {
1973
+ return ret;
1974
+ }
1975
+ }
1976
+
1977
+ num = meta->num;
1978
+ if (meta->base >= 0 && meta->base < NPY_DATETIME_NUMUNITS) {
1979
+ basestr = _datetime_strings[meta->base];
1980
+ }
1981
+ else {
1982
+ PyErr_SetString(PyExc_RuntimeError,
1983
+ "NumPy datetime metadata is corrupted");
1984
+ return NULL;
1985
+ }
1986
+
1987
+ if (num == 1) {
1988
+ if (skip_brackets) {
1989
+ res = PyUString_FromFormat("%s", basestr);
1990
+ }
1991
+ else {
1992
+ res = PyUString_FromFormat("[%s]", basestr);
1993
+ }
1994
+ }
1995
+ else {
1996
+ if (skip_brackets) {
1997
+ res = PyUString_FromFormat("%d%s", num, basestr);
1998
+ }
1999
+ else {
2000
+ res = PyUString_FromFormat("[%d%s]", num, basestr);
2001
+ }
2002
+ }
2003
+
2004
+ PyUString_ConcatAndDel(&ret, res);
2005
+ return ret;
2006
+ }
2007
+
2008
+ /*
2009
+ * Adjusts a datetimestruct based on a seconds offset. Assumes
2010
+ * the current values are valid.
2011
+ */
2012
+ NPY_NO_EXPORT void
2013
+ add_seconds_to_datetimestruct(npy_datetimestruct *dts, int seconds)
2014
+ {
2015
+ int minutes;
2016
+
2017
+ dts->sec += seconds;
2018
+ if (dts->sec < 0) {
2019
+ minutes = dts->sec / 60;
2020
+ dts->sec = dts->sec % 60;
2021
+ if (dts->sec < 0) {
2022
+ --minutes;
2023
+ dts->sec += 60;
2024
+ }
2025
+ add_minutes_to_datetimestruct(dts, minutes);
2026
+ }
2027
+ else if (dts->sec >= 60) {
2028
+ minutes = dts->sec / 60;
2029
+ dts->sec = dts->sec % 60;
2030
+ add_minutes_to_datetimestruct(dts, minutes);
2031
+ }
2032
+ }
2033
+
2034
+ /*
2035
+ * Adjusts a datetimestruct based on a minutes offset. Assumes
2036
+ * the current values are valid.
2037
+ */
2038
+ NPY_NO_EXPORT void
2039
+ add_minutes_to_datetimestruct(npy_datetimestruct *dts, int minutes)
2040
+ {
2041
+ int isleap;
2042
+
2043
+ /* MINUTES */
2044
+ dts->min += minutes;
2045
+ while (dts->min < 0) {
2046
+ dts->min += 60;
2047
+ dts->hour--;
2048
+ }
2049
+ while (dts->min >= 60) {
2050
+ dts->min -= 60;
2051
+ dts->hour++;
2052
+ }
2053
+
2054
+ /* HOURS */
2055
+ while (dts->hour < 0) {
2056
+ dts->hour += 24;
2057
+ dts->day--;
2058
+ }
2059
+ while (dts->hour >= 24) {
2060
+ dts->hour -= 24;
2061
+ dts->day++;
2062
+ }
2063
+
2064
+ /* DAYS */
2065
+ if (dts->day < 1) {
2066
+ dts->month--;
2067
+ if (dts->month < 1) {
2068
+ dts->year--;
2069
+ dts->month = 12;
2070
+ }
2071
+ isleap = is_leapyear(dts->year);
2072
+ dts->day += _days_per_month_table[isleap][dts->month-1];
2073
+ }
2074
+ else if (dts->day > 28) {
2075
+ isleap = is_leapyear(dts->year);
2076
+ if (dts->day > _days_per_month_table[isleap][dts->month-1]) {
2077
+ dts->day -= _days_per_month_table[isleap][dts->month-1];
2078
+ dts->month++;
2079
+ if (dts->month > 12) {
2080
+ dts->year++;
2081
+ dts->month = 1;
2082
+ }
2083
+ }
2084
+ }
2085
+ }
2086
+
2087
+ /*
2088
+ * Tests for and converts a Python datetime.datetime or datetime.date
2089
+ * object into a NumPy npy_datetimestruct.
2090
+ *
2091
+ * While the C API has PyDate_* and PyDateTime_* functions, the following
2092
+ * implementation just asks for attributes, and thus supports
2093
+ * datetime duck typing. The tzinfo time zone conversion would require
2094
+ * this style of access anyway.
2095
+ *
2096
+ * 'out_bestunit' gives a suggested unit based on whether the object
2097
+ * was a datetime.date or datetime.datetime object.
2098
+ *
2099
+ * If 'apply_tzinfo' is 1, this function uses the tzinfo to convert
2100
+ * to UTC time, otherwise it returns the struct with the local time.
2101
+ *
2102
+ * Returns -1 on error, 0 on success, and 1 (with no error set)
2103
+ * if obj doesn't have the neeeded date or datetime attributes.
2104
+ */
2105
+ NPY_NO_EXPORT int
2106
+ convert_pydatetime_to_datetimestruct(PyObject *obj, npy_datetimestruct *out,
2107
+ NPY_DATETIMEUNIT *out_bestunit,
2108
+ int apply_tzinfo)
2109
+ {
2110
+ PyObject *tmp;
2111
+ int isleap;
2112
+
2113
+ /* Initialize the output to all zeros */
2114
+ memset(out, 0, sizeof(npy_datetimestruct));
2115
+ out->month = 1;
2116
+ out->day = 1;
2117
+
2118
+ /* Need at least year/month/day attributes */
2119
+ if (!PyObject_HasAttrString(obj, "year") ||
2120
+ !PyObject_HasAttrString(obj, "month") ||
2121
+ !PyObject_HasAttrString(obj, "day")) {
2122
+ return 1;
2123
+ }
2124
+
2125
+ /* Get the year */
2126
+ tmp = PyObject_GetAttrString(obj, "year");
2127
+ if (tmp == NULL) {
2128
+ return -1;
2129
+ }
2130
+ out->year = PyInt_AsLong(tmp);
2131
+ if (out->year == -1 && PyErr_Occurred()) {
2132
+ Py_DECREF(tmp);
2133
+ return -1;
2134
+ }
2135
+ Py_DECREF(tmp);
2136
+
2137
+ /* Get the month */
2138
+ tmp = PyObject_GetAttrString(obj, "month");
2139
+ if (tmp == NULL) {
2140
+ return -1;
2141
+ }
2142
+ out->month = PyInt_AsLong(tmp);
2143
+ if (out->month == -1 && PyErr_Occurred()) {
2144
+ Py_DECREF(tmp);
2145
+ return -1;
2146
+ }
2147
+ Py_DECREF(tmp);
2148
+
2149
+ /* Get the day */
2150
+ tmp = PyObject_GetAttrString(obj, "day");
2151
+ if (tmp == NULL) {
2152
+ return -1;
2153
+ }
2154
+ out->day = PyInt_AsLong(tmp);
2155
+ if (out->day == -1 && PyErr_Occurred()) {
2156
+ Py_DECREF(tmp);
2157
+ return -1;
2158
+ }
2159
+ Py_DECREF(tmp);
2160
+
2161
+ /* Validate that the month and day are valid for the year */
2162
+ if (out->month < 1 || out->month > 12) {
2163
+ goto invalid_date;
2164
+ }
2165
+ isleap = is_leapyear(out->year);
2166
+ if (out->day < 1 ||
2167
+ out->day > _days_per_month_table[isleap][out->month-1]) {
2168
+ goto invalid_date;
2169
+ }
2170
+
2171
+ /* Check for time attributes (if not there, return success as a date) */
2172
+ if (!PyObject_HasAttrString(obj, "hour") ||
2173
+ !PyObject_HasAttrString(obj, "minute") ||
2174
+ !PyObject_HasAttrString(obj, "second") ||
2175
+ !PyObject_HasAttrString(obj, "microsecond")) {
2176
+ /* The best unit for date is 'D' */
2177
+ if (out_bestunit != NULL) {
2178
+ *out_bestunit = NPY_FR_D;
2179
+ }
2180
+ return 0;
2181
+ }
2182
+
2183
+ /* Get the hour */
2184
+ tmp = PyObject_GetAttrString(obj, "hour");
2185
+ if (tmp == NULL) {
2186
+ return -1;
2187
+ }
2188
+ out->hour = PyInt_AsLong(tmp);
2189
+ if (out->hour == -1 && PyErr_Occurred()) {
2190
+ Py_DECREF(tmp);
2191
+ return -1;
2192
+ }
2193
+ Py_DECREF(tmp);
2194
+
2195
+ /* Get the minute */
2196
+ tmp = PyObject_GetAttrString(obj, "minute");
2197
+ if (tmp == NULL) {
2198
+ return -1;
2199
+ }
2200
+ out->min = PyInt_AsLong(tmp);
2201
+ if (out->min == -1 && PyErr_Occurred()) {
2202
+ Py_DECREF(tmp);
2203
+ return -1;
2204
+ }
2205
+ Py_DECREF(tmp);
2206
+
2207
+ /* Get the second */
2208
+ tmp = PyObject_GetAttrString(obj, "second");
2209
+ if (tmp == NULL) {
2210
+ return -1;
2211
+ }
2212
+ out->sec = PyInt_AsLong(tmp);
2213
+ if (out->sec == -1 && PyErr_Occurred()) {
2214
+ Py_DECREF(tmp);
2215
+ return -1;
2216
+ }
2217
+ Py_DECREF(tmp);
2218
+
2219
+ /* Get the microsecond */
2220
+ tmp = PyObject_GetAttrString(obj, "microsecond");
2221
+ if (tmp == NULL) {
2222
+ return -1;
2223
+ }
2224
+ out->us = PyInt_AsLong(tmp);
2225
+ if (out->us == -1 && PyErr_Occurred()) {
2226
+ Py_DECREF(tmp);
2227
+ return -1;
2228
+ }
2229
+ Py_DECREF(tmp);
2230
+
2231
+ if (out->hour < 0 || out->hour >= 24 ||
2232
+ out->min < 0 || out->min >= 60 ||
2233
+ out->sec < 0 || out->sec >= 60 ||
2234
+ out->us < 0 || out->us >= 1000000) {
2235
+ goto invalid_time;
2236
+ }
2237
+
2238
+ /* Apply the time zone offset if it exists */
2239
+ if (apply_tzinfo && PyObject_HasAttrString(obj, "tzinfo")) {
2240
+ tmp = PyObject_GetAttrString(obj, "tzinfo");
2241
+ if (tmp == NULL) {
2242
+ return -1;
2243
+ }
2244
+ if (tmp == Py_None) {
2245
+ Py_DECREF(tmp);
2246
+ }
2247
+ else {
2248
+ PyObject *offset;
2249
+ int seconds_offset, minutes_offset;
2250
+
2251
+ /* The utcoffset function should return a timedelta */
2252
+ offset = PyObject_CallMethod(tmp, "utcoffset", "O", obj);
2253
+ if (offset == NULL) {
2254
+ Py_DECREF(tmp);
2255
+ return -1;
2256
+ }
2257
+ Py_DECREF(tmp);
2258
+
2259
+ /*
2260
+ * The timedelta should have a function "total_seconds"
2261
+ * which contains the value we want.
2262
+ */
2263
+ tmp = PyObject_CallMethod(offset, "total_seconds", "");
2264
+ if (tmp == NULL) {
2265
+ return -1;
2266
+ }
2267
+ seconds_offset = PyInt_AsLong(tmp);
2268
+ if (seconds_offset == -1 && PyErr_Occurred()) {
2269
+ Py_DECREF(tmp);
2270
+ return -1;
2271
+ }
2272
+ Py_DECREF(tmp);
2273
+
2274
+ /* Convert to a minutes offset and apply it */
2275
+ minutes_offset = seconds_offset / 60;
2276
+
2277
+ add_minutes_to_datetimestruct(out, -minutes_offset);
2278
+ }
2279
+ }
2280
+
2281
+ /* The resolution of Python's datetime is 'us' */
2282
+ if (out_bestunit != NULL) {
2283
+ *out_bestunit = NPY_FR_us;
2284
+ }
2285
+
2286
+ return 0;
2287
+
2288
+ invalid_date:
2289
+ PyErr_Format(PyExc_ValueError,
2290
+ "Invalid date (%d,%d,%d) when converting to NumPy datetime",
2291
+ (int)out->year, (int)out->month, (int)out->day);
2292
+ return -1;
2293
+
2294
+ invalid_time:
2295
+ PyErr_Format(PyExc_ValueError,
2296
+ "Invalid time (%d,%d,%d,%d) when converting "
2297
+ "to NumPy datetime",
2298
+ (int)out->hour, (int)out->min, (int)out->sec, (int)out->us);
2299
+ return -1;
2300
+ }
2301
+
2302
+ /*
2303
+ * Gets a tzoffset in minutes by calling the fromutc() function on
2304
+ * the Python datetime.tzinfo object.
2305
+ */
2306
+ NPY_NO_EXPORT int
2307
+ get_tzoffset_from_pytzinfo(PyObject *timezone_obj, npy_datetimestruct *dts)
2308
+ {
2309
+ PyObject *dt, *loc_dt;
2310
+ npy_datetimestruct loc_dts;
2311
+
2312
+ /* Create a Python datetime to give to the timezone object */
2313
+ dt = PyDateTime_FromDateAndTime((int)dts->year, dts->month, dts->day,
2314
+ dts->hour, dts->min, 0, 0);
2315
+ if (dt == NULL) {
2316
+ return -1;
2317
+ }
2318
+
2319
+ /* Convert the datetime from UTC to local time */
2320
+ loc_dt = PyObject_CallMethod(timezone_obj, "fromutc", "O", dt);
2321
+ Py_DECREF(dt);
2322
+ if (loc_dt == NULL) {
2323
+ return -1;
2324
+ }
2325
+
2326
+ /* Convert the local datetime into a datetimestruct */
2327
+ if (convert_pydatetime_to_datetimestruct(loc_dt, &loc_dts, NULL, 0) < 0) {
2328
+ Py_DECREF(loc_dt);
2329
+ return -1;
2330
+ }
2331
+
2332
+ Py_DECREF(loc_dt);
2333
+
2334
+ /* Calculate the tzoffset as the difference between the datetimes */
2335
+ return (int)(get_datetimestruct_minutes(&loc_dts) -
2336
+ get_datetimestruct_minutes(dts));
2337
+ }
2338
+
2339
+ /*
2340
+ * Converts a PyObject * into a datetime, in any of the forms supported.
2341
+ *
2342
+ * If the units metadata isn't known ahead of time, set meta->base
2343
+ * to -1, and this function will populate meta with either default
2344
+ * values or values from the input object.
2345
+ *
2346
+ * The 'casting' parameter is used to control what kinds of inputs
2347
+ * are accepted, and what happens. For example, with 'unsafe' casting,
2348
+ * unrecognized inputs are converted to 'NaT' instead of throwing an error,
2349
+ * while with 'safe' casting an error will be thrown if any precision
2350
+ * from the input will be thrown away.
2351
+ *
2352
+ * Returns -1 on error, 0 on success.
2353
+ */
2354
+ NPY_NO_EXPORT int
2355
+ convert_pyobject_to_datetime(PyArray_DatetimeMetaData *meta, PyObject *obj,
2356
+ NPY_CASTING casting, npy_datetime *out)
2357
+ {
2358
+ if (PyBytes_Check(obj) || PyUnicode_Check(obj)) {
2359
+ PyObject *bytes = NULL;
2360
+ char *str = NULL;
2361
+ Py_ssize_t len = 0;
2362
+ npy_datetimestruct dts;
2363
+ NPY_DATETIMEUNIT bestunit = -1;
2364
+
2365
+ /* Convert to an ASCII string for the date parser */
2366
+ if (PyUnicode_Check(obj)) {
2367
+ bytes = PyUnicode_AsASCIIString(obj);
2368
+ if (bytes == NULL) {
2369
+ return -1;
2370
+ }
2371
+ }
2372
+ else {
2373
+ bytes = obj;
2374
+ Py_INCREF(bytes);
2375
+ }
2376
+ if (PyBytes_AsStringAndSize(bytes, &str, &len) < 0) {
2377
+ Py_DECREF(bytes);
2378
+ return -1;
2379
+ }
2380
+
2381
+ /* Parse the ISO date */
2382
+ if (parse_iso_8601_datetime(str, len, meta->base, casting,
2383
+ &dts, NULL, &bestunit, NULL) < 0) {
2384
+ Py_DECREF(bytes);
2385
+ return -1;
2386
+ }
2387
+
2388
+ /* Use the detected unit if none was specified */
2389
+ if (meta->base == -1) {
2390
+ meta->base = bestunit;
2391
+ meta->num = 1;
2392
+ }
2393
+
2394
+ if (convert_datetimestruct_to_datetime(meta, &dts, out) < 0) {
2395
+ Py_DECREF(bytes);
2396
+ return -1;
2397
+ }
2398
+
2399
+ Py_DECREF(bytes);
2400
+ return 0;
2401
+ }
2402
+ /* Do no conversion on raw integers */
2403
+ else if (PyInt_Check(obj) || PyLong_Check(obj)) {
2404
+ /* Don't allow conversion from an integer without specifying a unit */
2405
+ if (meta->base == -1 || meta->base == NPY_FR_GENERIC) {
2406
+ PyErr_SetString(PyExc_ValueError, "Converting an integer to a "
2407
+ "NumPy datetime requires a specified unit");
2408
+ return -1;
2409
+ }
2410
+ *out = PyLong_AsLongLong(obj);
2411
+ return 0;
2412
+ }
2413
+ /* Datetime scalar */
2414
+ else if (PyArray_IsScalar(obj, Datetime)) {
2415
+ PyDatetimeScalarObject *dts = (PyDatetimeScalarObject *)obj;
2416
+
2417
+ /* Copy the scalar directly if units weren't specified */
2418
+ if (meta->base == -1) {
2419
+ *meta = dts->obmeta;
2420
+ *out = dts->obval;
2421
+
2422
+ return 0;
2423
+ }
2424
+ /* Otherwise do a casting transformation */
2425
+ else {
2426
+ /* Allow NaT (not-a-time) values to slip through any rule */
2427
+ if (dts->obval != NPY_DATETIME_NAT &&
2428
+ raise_if_datetime64_metadata_cast_error(
2429
+ "NumPy timedelta64 scalar",
2430
+ &dts->obmeta, meta, casting) < 0) {
2431
+ return -1;
2432
+ }
2433
+ else {
2434
+ return cast_datetime_to_datetime(&dts->obmeta, meta,
2435
+ dts->obval, out);
2436
+ }
2437
+ }
2438
+ }
2439
+ /* Datetime zero-dimensional array */
2440
+ else if (PyArray_Check(obj) &&
2441
+ PyArray_NDIM((PyArrayObject *)obj) == 0 &&
2442
+ PyArray_DESCR((PyArrayObject *)obj)->type_num == NPY_DATETIME) {
2443
+ PyArrayObject *arr = (PyArrayObject *)obj;
2444
+ PyArray_DatetimeMetaData *arr_meta;
2445
+ npy_datetime dt = 0;
2446
+
2447
+ arr_meta = get_datetime_metadata_from_dtype(PyArray_DESCR(arr));
2448
+ if (arr_meta == NULL) {
2449
+ return -1;
2450
+ }
2451
+ PyArray_DESCR(arr)->f->copyswap(&dt,
2452
+ PyArray_DATA(arr),
2453
+ !PyArray_ISNOTSWAPPED(arr),
2454
+ obj);
2455
+
2456
+ /* Copy the value directly if units weren't specified */
2457
+ if (meta->base == -1) {
2458
+ *meta = *arr_meta;
2459
+ *out = dt;
2460
+
2461
+ return 0;
2462
+ }
2463
+ /* Otherwise do a casting transformation */
2464
+ else {
2465
+ /* Allow NaT (not-a-time) values to slip through any rule */
2466
+ if (dt != NPY_DATETIME_NAT &&
2467
+ raise_if_datetime64_metadata_cast_error(
2468
+ "NumPy timedelta64 scalar",
2469
+ arr_meta, meta, casting) < 0) {
2470
+ return -1;
2471
+ }
2472
+ else {
2473
+ return cast_datetime_to_datetime(arr_meta, meta, dt, out);
2474
+ }
2475
+ }
2476
+ }
2477
+ /* Convert from a Python date or datetime object */
2478
+ else {
2479
+ int code;
2480
+ npy_datetimestruct dts;
2481
+ NPY_DATETIMEUNIT bestunit = -1;
2482
+
2483
+ code = convert_pydatetime_to_datetimestruct(obj, &dts, &bestunit, 1);
2484
+ if (code == -1) {
2485
+ return -1;
2486
+ }
2487
+ else if (code == 0) {
2488
+ /* Use the detected unit if none was specified */
2489
+ if (meta->base == -1) {
2490
+ meta->base = bestunit;
2491
+ meta->num = 1;
2492
+ }
2493
+ else {
2494
+ PyArray_DatetimeMetaData obj_meta;
2495
+ obj_meta.base = bestunit;
2496
+ obj_meta.num = 1;
2497
+
2498
+ if (raise_if_datetime64_metadata_cast_error(
2499
+ bestunit == NPY_FR_D ? "datetime.date object"
2500
+ : "datetime.datetime object",
2501
+ &obj_meta, meta, casting) < 0) {
2502
+ return -1;
2503
+ }
2504
+ }
2505
+
2506
+ return convert_datetimestruct_to_datetime(meta, &dts, out);
2507
+ }
2508
+ }
2509
+
2510
+ /*
2511
+ * With unsafe casting, convert unrecognized objects into NaT
2512
+ * and with same_kind casting, convert None into NaT
2513
+ */
2514
+ if (casting == NPY_UNSAFE_CASTING ||
2515
+ (obj == Py_None && casting == NPY_SAME_KIND_CASTING)) {
2516
+ if (meta->base == -1) {
2517
+ meta->base = NPY_FR_GENERIC;
2518
+ meta->num = 1;
2519
+ }
2520
+ *out = NPY_DATETIME_NAT;
2521
+ return 0;
2522
+ }
2523
+ else {
2524
+ PyErr_SetString(PyExc_ValueError,
2525
+ "Could not convert object to NumPy datetime");
2526
+ return -1;
2527
+ }
2528
+ }
2529
+
2530
+ /*
2531
+ * Converts a PyObject * into a timedelta, in any of the forms supported
2532
+ *
2533
+ * If the units metadata isn't known ahead of time, set meta->base
2534
+ * to -1, and this function will populate meta with either default
2535
+ * values or values from the input object.
2536
+ *
2537
+ * The 'casting' parameter is used to control what kinds of inputs
2538
+ * are accepted, and what happens. For example, with 'unsafe' casting,
2539
+ * unrecognized inputs are converted to 'NaT' instead of throwing an error,
2540
+ * while with 'safe' casting an error will be thrown if any precision
2541
+ * from the input will be thrown away.
2542
+ *
2543
+ * Returns -1 on error, 0 on success.
2544
+ */
2545
+ NPY_NO_EXPORT int
2546
+ convert_pyobject_to_timedelta(PyArray_DatetimeMetaData *meta, PyObject *obj,
2547
+ NPY_CASTING casting, npy_timedelta *out)
2548
+ {
2549
+ if (PyBytes_Check(obj) || PyUnicode_Check(obj)) {
2550
+ PyObject *bytes = NULL;
2551
+ char *str = NULL;
2552
+ Py_ssize_t len = 0;
2553
+ int succeeded = 0;
2554
+
2555
+ /* Convert to an ASCII string for the date parser */
2556
+ if (PyUnicode_Check(obj)) {
2557
+ bytes = PyUnicode_AsASCIIString(obj);
2558
+ if (bytes == NULL) {
2559
+ return -1;
2560
+ }
2561
+ }
2562
+ else {
2563
+ bytes = obj;
2564
+ Py_INCREF(bytes);
2565
+ }
2566
+ if (PyBytes_AsStringAndSize(bytes, &str, &len) < 0) {
2567
+ Py_DECREF(bytes);
2568
+ return -1;
2569
+ }
2570
+
2571
+ /* Check for a NaT string */
2572
+ if (len <= 0 || (len == 3 &&
2573
+ tolower(str[0]) == 'n' &&
2574
+ tolower(str[1]) == 'a' &&
2575
+ tolower(str[2]) == 't')) {
2576
+ *out = NPY_DATETIME_NAT;
2577
+ succeeded = 1;
2578
+ }
2579
+ /* Parse as an integer */
2580
+ else {
2581
+ char *strend = NULL;
2582
+
2583
+ *out = strtol(str, &strend, 10);
2584
+ if (strend - str == len) {
2585
+ succeeded = 1;
2586
+ }
2587
+ }
2588
+ Py_DECREF(bytes);
2589
+
2590
+ if (succeeded) {
2591
+ /* Use generic units if none was specified */
2592
+ if (meta->base == -1) {
2593
+ meta->base = NPY_FR_GENERIC;
2594
+ meta->num = 1;
2595
+ }
2596
+
2597
+ return 0;
2598
+ }
2599
+ }
2600
+ /* Do no conversion on raw integers */
2601
+ else if (PyInt_Check(obj) || PyLong_Check(obj)) {
2602
+ /* Use the default unit if none was specified */
2603
+ if (meta->base == -1) {
2604
+ meta->base = NPY_DATETIME_DEFAULTUNIT;
2605
+ meta->num = 1;
2606
+ }
2607
+
2608
+ *out = PyLong_AsLongLong(obj);
2609
+ return 0;
2610
+ }
2611
+ /* Timedelta scalar */
2612
+ else if (PyArray_IsScalar(obj, Timedelta)) {
2613
+ PyTimedeltaScalarObject *dts = (PyTimedeltaScalarObject *)obj;
2614
+
2615
+ /* Copy the scalar directly if units weren't specified */
2616
+ if (meta->base == -1) {
2617
+ *meta = dts->obmeta;
2618
+ *out = dts->obval;
2619
+
2620
+ return 0;
2621
+ }
2622
+ /* Otherwise do a casting transformation */
2623
+ else {
2624
+ /* Allow NaT (not-a-time) values to slip through any rule */
2625
+ if (dts->obval != NPY_DATETIME_NAT &&
2626
+ raise_if_timedelta64_metadata_cast_error(
2627
+ "NumPy timedelta64 scalar",
2628
+ &dts->obmeta, meta, casting) < 0) {
2629
+ return -1;
2630
+ }
2631
+ else {
2632
+ return cast_timedelta_to_timedelta(&dts->obmeta, meta,
2633
+ dts->obval, out);
2634
+ }
2635
+ }
2636
+ }
2637
+ /* Timedelta zero-dimensional array */
2638
+ else if (PyArray_Check(obj) &&
2639
+ PyArray_NDIM((PyArrayObject *)obj) == 0 &&
2640
+ PyArray_DESCR((PyArrayObject *)obj)->type_num == NPY_TIMEDELTA) {
2641
+ PyArrayObject *arr = (PyArrayObject *)obj;
2642
+ PyArray_DatetimeMetaData *arr_meta;
2643
+ npy_timedelta dt = 0;
2644
+
2645
+ arr_meta = get_datetime_metadata_from_dtype(PyArray_DESCR(arr));
2646
+ if (arr_meta == NULL) {
2647
+ return -1;
2648
+ }
2649
+ PyArray_DESCR(arr)->f->copyswap(&dt,
2650
+ PyArray_DATA(arr),
2651
+ !PyArray_ISNOTSWAPPED(arr),
2652
+ obj);
2653
+
2654
+ /* Copy the value directly if units weren't specified */
2655
+ if (meta->base == -1) {
2656
+ *meta = *arr_meta;
2657
+ *out = dt;
2658
+
2659
+ return 0;
2660
+ }
2661
+ /* Otherwise do a casting transformation */
2662
+ else {
2663
+ /* Allow NaT (not-a-time) values to slip through any rule */
2664
+ if (dt != NPY_DATETIME_NAT &&
2665
+ raise_if_timedelta64_metadata_cast_error(
2666
+ "NumPy timedelta64 scalar",
2667
+ arr_meta, meta, casting) < 0) {
2668
+ return -1;
2669
+ }
2670
+ else {
2671
+ return cast_timedelta_to_timedelta(arr_meta, meta, dt, out);
2672
+ }
2673
+ }
2674
+ }
2675
+ /* Convert from a Python timedelta object */
2676
+ else if (PyObject_HasAttrString(obj, "days") &&
2677
+ PyObject_HasAttrString(obj, "seconds") &&
2678
+ PyObject_HasAttrString(obj, "microseconds")) {
2679
+ PyObject *tmp;
2680
+ PyArray_DatetimeMetaData us_meta;
2681
+ npy_timedelta td;
2682
+ npy_int64 days;
2683
+ int seconds = 0, useconds = 0;
2684
+
2685
+ /* Get the days */
2686
+ tmp = PyObject_GetAttrString(obj, "days");
2687
+ if (tmp == NULL) {
2688
+ return -1;
2689
+ }
2690
+ days = PyLong_AsLongLong(tmp);
2691
+ if (days == -1 && PyErr_Occurred()) {
2692
+ Py_DECREF(tmp);
2693
+ return -1;
2694
+ }
2695
+ Py_DECREF(tmp);
2696
+
2697
+ /* Get the seconds */
2698
+ tmp = PyObject_GetAttrString(obj, "seconds");
2699
+ if (tmp == NULL) {
2700
+ return -1;
2701
+ }
2702
+ seconds = PyInt_AsLong(tmp);
2703
+ if (seconds == -1 && PyErr_Occurred()) {
2704
+ Py_DECREF(tmp);
2705
+ return -1;
2706
+ }
2707
+ Py_DECREF(tmp);
2708
+
2709
+ /* Get the microseconds */
2710
+ tmp = PyObject_GetAttrString(obj, "microseconds");
2711
+ if (tmp == NULL) {
2712
+ return -1;
2713
+ }
2714
+ useconds = PyInt_AsLong(tmp);
2715
+ if (useconds == -1 && PyErr_Occurred()) {
2716
+ Py_DECREF(tmp);
2717
+ return -1;
2718
+ }
2719
+ Py_DECREF(tmp);
2720
+
2721
+ td = days*(24*60*60*1000000LL) + seconds*1000000LL + useconds;
2722
+
2723
+ /* Use microseconds if none was specified */
2724
+ if (meta->base == -1) {
2725
+ meta->base = NPY_FR_us;
2726
+ meta->num = 1;
2727
+
2728
+ *out = td;
2729
+
2730
+ return 0;
2731
+ }
2732
+ else {
2733
+ /*
2734
+ * Detect the largest unit where every value after is zero,
2735
+ * to allow safe casting to seconds if microseconds is zero,
2736
+ * for instance.
2737
+ */
2738
+ if (td % 1000LL != 0) {
2739
+ us_meta.base = NPY_FR_us;
2740
+ }
2741
+ else if (td % 1000000LL != 0) {
2742
+ us_meta.base = NPY_FR_ms;
2743
+ }
2744
+ else if (td % (60*1000000LL) != 0) {
2745
+ us_meta.base = NPY_FR_s;
2746
+ }
2747
+ else if (td % (60*60*1000000LL) != 0) {
2748
+ us_meta.base = NPY_FR_m;
2749
+ }
2750
+ else if (td % (24*60*60*1000000LL) != 0) {
2751
+ us_meta.base = NPY_FR_D;
2752
+ }
2753
+ else if (td % (7*24*60*60*1000000LL) != 0) {
2754
+ us_meta.base = NPY_FR_W;
2755
+ }
2756
+ us_meta.num = 1;
2757
+
2758
+ if (raise_if_timedelta64_metadata_cast_error(
2759
+ "datetime.timedelta object",
2760
+ &us_meta, meta, casting) < 0) {
2761
+ return -1;
2762
+ }
2763
+ else {
2764
+ /* Switch back to microseconds for the casting operation */
2765
+ us_meta.base = NPY_FR_us;
2766
+
2767
+ return cast_timedelta_to_timedelta(&us_meta, meta, td, out);
2768
+ }
2769
+ }
2770
+ }
2771
+
2772
+ /*
2773
+ * With unsafe casting, convert unrecognized objects into NaT
2774
+ * and with same_kind casting, convert None into NaT
2775
+ */
2776
+ if (casting == NPY_UNSAFE_CASTING ||
2777
+ (obj == Py_None && casting == NPY_SAME_KIND_CASTING)) {
2778
+ if (meta->base == -1) {
2779
+ meta->base = NPY_FR_GENERIC;
2780
+ meta->num = 1;
2781
+ }
2782
+ *out = NPY_DATETIME_NAT;
2783
+ return 0;
2784
+ }
2785
+ else {
2786
+ PyErr_SetString(PyExc_ValueError,
2787
+ "Could not convert object to NumPy timedelta");
2788
+ return -1;
2789
+ }
2790
+ }
2791
+
2792
+ /*
2793
+ * Converts a datetime into a PyObject *.
2794
+ *
2795
+ * Not-a-time is returned as the string "NaT".
2796
+ * For days or coarser, returns a datetime.date.
2797
+ * For microseconds or coarser, returns a datetime.datetime.
2798
+ * For units finer than microseconds, returns an integer.
2799
+ */
2800
+ NPY_NO_EXPORT PyObject *
2801
+ convert_datetime_to_pyobject(npy_datetime dt, PyArray_DatetimeMetaData *meta)
2802
+ {
2803
+ PyObject *ret = NULL;
2804
+ npy_datetimestruct dts;
2805
+
2806
+ /*
2807
+ * Convert NaT (not-a-time) and any value with generic units
2808
+ * into None.
2809
+ */
2810
+ if (dt == NPY_DATETIME_NAT || meta->base == NPY_FR_GENERIC) {
2811
+ Py_RETURN_NONE;
2812
+ }
2813
+
2814
+ /* If the type's precision is greater than microseconds, return an int */
2815
+ if (meta->base > NPY_FR_us) {
2816
+ return PyLong_FromLongLong(dt);
2817
+ }
2818
+
2819
+ /* Convert to a datetimestruct */
2820
+ if (convert_datetime_to_datetimestruct(meta, dt, &dts) < 0) {
2821
+ return NULL;
2822
+ }
2823
+
2824
+ /*
2825
+ * If the year is outside the range of years supported by Python's
2826
+ * datetime, or the datetime64 falls on a leap second,
2827
+ * return a raw int.
2828
+ */
2829
+ if (dts.year < 1 || dts.year > 9999 || dts.sec == 60) {
2830
+ return PyLong_FromLongLong(dt);
2831
+ }
2832
+
2833
+ /* If the type's precision is greater than days, return a datetime */
2834
+ if (meta->base > NPY_FR_D) {
2835
+ ret = PyDateTime_FromDateAndTime(dts.year, dts.month, dts.day,
2836
+ dts.hour, dts.min, dts.sec, dts.us);
2837
+ }
2838
+ /* Otherwise return a date */
2839
+ else {
2840
+ ret = PyDate_FromDate(dts.year, dts.month, dts.day);
2841
+ }
2842
+
2843
+ return ret;
2844
+ }
2845
+
2846
+ /*
2847
+ * Converts a timedelta into a PyObject *.
2848
+ *
2849
+ * Not-a-time is returned as the string "NaT".
2850
+ * For microseconds or coarser, returns a datetime.timedelta.
2851
+ * For units finer than microseconds, returns an integer.
2852
+ */
2853
+ NPY_NO_EXPORT PyObject *
2854
+ convert_timedelta_to_pyobject(npy_timedelta td, PyArray_DatetimeMetaData *meta)
2855
+ {
2856
+ PyObject *ret = NULL;
2857
+ npy_timedelta value;
2858
+ int days = 0, seconds = 0, useconds = 0;
2859
+
2860
+ /*
2861
+ * Convert NaT (not-a-time) into None.
2862
+ */
2863
+ if (td == NPY_DATETIME_NAT) {
2864
+ Py_RETURN_NONE;
2865
+ }
2866
+
2867
+ /*
2868
+ * If the type's precision is greater than microseconds, is
2869
+ * Y/M/B (nonlinear units), or is generic units, return an int
2870
+ */
2871
+ if (meta->base > NPY_FR_us ||
2872
+ meta->base == NPY_FR_Y ||
2873
+ meta->base == NPY_FR_M ||
2874
+ meta->base == NPY_FR_GENERIC) {
2875
+ return PyLong_FromLongLong(td);
2876
+ }
2877
+
2878
+ value = td;
2879
+
2880
+ /* Apply the unit multiplier (TODO: overflow treatment...) */
2881
+ value *= meta->num;
2882
+
2883
+ /* Convert to days/seconds/useconds */
2884
+ switch (meta->base) {
2885
+ case NPY_FR_W:
2886
+ value *= 7;
2887
+ break;
2888
+ case NPY_FR_D:
2889
+ break;
2890
+ case NPY_FR_h:
2891
+ seconds = (int)((value % 24) * (60*60));
2892
+ value = value / 24;
2893
+ break;
2894
+ case NPY_FR_m:
2895
+ seconds = (int)(value % (24*60)) * 60;
2896
+ value = value / (24*60);
2897
+ break;
2898
+ case NPY_FR_s:
2899
+ seconds = (int)(value % (24*60*60));
2900
+ value = value / (24*60*60);
2901
+ break;
2902
+ case NPY_FR_ms:
2903
+ useconds = (int)(value % 1000) * 1000;
2904
+ value = value / 1000;
2905
+ seconds = (int)(value % (24*60*60));
2906
+ value = value / (24*60*60);
2907
+ break;
2908
+ case NPY_FR_us:
2909
+ useconds = (int)(value % (1000*1000));
2910
+ value = value / (1000*1000);
2911
+ seconds = (int)(value % (24*60*60));
2912
+ value = value / (24*60*60);
2913
+ break;
2914
+ default:
2915
+ break;
2916
+ }
2917
+ /*
2918
+ * 'value' represents days, and seconds/useconds are filled.
2919
+ *
2920
+ * If it would overflow the datetime.timedelta days, return a raw int
2921
+ */
2922
+ if (value < -999999999 || value > 999999999) {
2923
+ return PyLong_FromLongLong(td);
2924
+ }
2925
+ else {
2926
+ days = (int)value;
2927
+ ret = PyDelta_FromDSU(days, seconds, useconds);
2928
+ if (ret == NULL) {
2929
+ return NULL;
2930
+ }
2931
+ }
2932
+
2933
+ return ret;
2934
+ }
2935
+
2936
+ /*
2937
+ * Returns true if the datetime metadata matches
2938
+ */
2939
+ NPY_NO_EXPORT npy_bool
2940
+ has_equivalent_datetime_metadata(PyArray_Descr *type1, PyArray_Descr *type2)
2941
+ {
2942
+ PyArray_DatetimeMetaData *meta1, *meta2;
2943
+
2944
+ if ((type1->type_num != NPY_DATETIME &&
2945
+ type1->type_num != NPY_TIMEDELTA) ||
2946
+ (type2->type_num != NPY_DATETIME &&
2947
+ type2->type_num != NPY_TIMEDELTA)) {
2948
+ return 0;
2949
+ }
2950
+
2951
+ meta1 = get_datetime_metadata_from_dtype(type1);
2952
+ if (meta1 == NULL) {
2953
+ PyErr_Clear();
2954
+ return 0;
2955
+ }
2956
+ meta2 = get_datetime_metadata_from_dtype(type2);
2957
+ if (meta2 == NULL) {
2958
+ PyErr_Clear();
2959
+ return 0;
2960
+ }
2961
+
2962
+ /* For generic units, the num is ignored */
2963
+ if (meta1->base == NPY_FR_GENERIC && meta2->base == NPY_FR_GENERIC) {
2964
+ return 1;
2965
+ }
2966
+
2967
+ return meta1->base == meta2->base &&
2968
+ meta1->num == meta2->num;
2969
+ }
2970
+
2971
+ /*
2972
+ * Casts a single datetime from having src_meta metadata into
2973
+ * dst_meta metadata.
2974
+ *
2975
+ * Returns 0 on success, -1 on failure.
2976
+ */
2977
+ NPY_NO_EXPORT int
2978
+ cast_datetime_to_datetime(PyArray_DatetimeMetaData *src_meta,
2979
+ PyArray_DatetimeMetaData *dst_meta,
2980
+ npy_datetime src_dt,
2981
+ npy_datetime *dst_dt)
2982
+ {
2983
+ npy_datetimestruct dts;
2984
+
2985
+ /* If the metadata is the same, short-circuit the conversion */
2986
+ if (src_meta->base == dst_meta->base &&
2987
+ src_meta->num == dst_meta->num) {
2988
+ *dst_dt = src_dt;
2989
+ return 0;
2990
+ }
2991
+
2992
+ /* Otherwise convert through a datetimestruct */
2993
+ if (convert_datetime_to_datetimestruct(src_meta, src_dt, &dts) < 0) {
2994
+ *dst_dt = NPY_DATETIME_NAT;
2995
+ return -1;
2996
+ }
2997
+ if (convert_datetimestruct_to_datetime(dst_meta, &dts, dst_dt) < 0) {
2998
+ *dst_dt = NPY_DATETIME_NAT;
2999
+ return -1;
3000
+ }
3001
+
3002
+ return 0;
3003
+ }
3004
+
3005
+ /*
3006
+ * Casts a single timedelta from having src_meta metadata into
3007
+ * dst_meta metadata.
3008
+ *
3009
+ * Returns 0 on success, -1 on failure.
3010
+ */
3011
+ NPY_NO_EXPORT int
3012
+ cast_timedelta_to_timedelta(PyArray_DatetimeMetaData *src_meta,
3013
+ PyArray_DatetimeMetaData *dst_meta,
3014
+ npy_timedelta src_dt,
3015
+ npy_timedelta *dst_dt)
3016
+ {
3017
+ npy_int64 num = 0, denom = 0;
3018
+
3019
+ /* If the metadata is the same, short-circuit the conversion */
3020
+ if (src_meta->base == dst_meta->base &&
3021
+ src_meta->num == dst_meta->num) {
3022
+ *dst_dt = src_dt;
3023
+ return 0;
3024
+ }
3025
+
3026
+ /* Get the conversion factor */
3027
+ get_datetime_conversion_factor(src_meta, dst_meta, &num, &denom);
3028
+
3029
+ if (num == 0) {
3030
+ return -1;
3031
+ }
3032
+
3033
+ /* Apply the scaling */
3034
+ if (src_dt < 0) {
3035
+ *dst_dt = (src_dt * num - (denom - 1)) / denom;
3036
+ }
3037
+ else {
3038
+ *dst_dt = src_dt * num / denom;
3039
+ }
3040
+
3041
+ return 0;
3042
+ }
3043
+
3044
+ /*
3045
+ * Returns true if the object is something that is best considered
3046
+ * a Datetime, false otherwise.
3047
+ */
3048
+ static NPY_GCC_NONNULL(1) npy_bool
3049
+ is_any_numpy_datetime(PyObject *obj)
3050
+ {
3051
+ return (PyArray_IsScalar(obj, Datetime) ||
3052
+ (PyArray_Check(obj) && (
3053
+ PyArray_DESCR((PyArrayObject *)obj)->type_num ==
3054
+ NPY_DATETIME)) ||
3055
+ PyDate_Check(obj) ||
3056
+ PyDateTime_Check(obj));
3057
+ }
3058
+
3059
+ /*
3060
+ * Returns true if the object is something that is best considered
3061
+ * a Timedelta, false otherwise.
3062
+ */
3063
+ static npy_bool
3064
+ is_any_numpy_timedelta(PyObject *obj)
3065
+ {
3066
+ return (PyArray_IsScalar(obj, Timedelta) ||
3067
+ (PyArray_Check(obj) && (
3068
+ PyArray_DESCR((PyArrayObject *)obj)->type_num == NPY_TIMEDELTA)) ||
3069
+ PyDelta_Check(obj));
3070
+ }
3071
+
3072
+ /*
3073
+ * Returns true if the object is something that is best considered
3074
+ * a Datetime or Timedelta, false otherwise.
3075
+ */
3076
+ NPY_NO_EXPORT npy_bool
3077
+ is_any_numpy_datetime_or_timedelta(PyObject *obj)
3078
+ {
3079
+ return obj != NULL &&
3080
+ (is_any_numpy_datetime(obj) ||
3081
+ is_any_numpy_timedelta(obj));
3082
+ }
3083
+
3084
+ /*
3085
+ * Converts an array of PyObject * into datetimes and/or timedeltas,
3086
+ * based on the values in type_nums.
3087
+ *
3088
+ * If inout_meta->base is -1, uses GCDs to calculate the metadata, filling
3089
+ * in 'inout_meta' with the resulting metadata. Otherwise uses the provided
3090
+ * 'inout_meta' for all the conversions.
3091
+ *
3092
+ * When obj[i] is NULL, out_value[i] will be set to NPY_DATETIME_NAT.
3093
+ *
3094
+ * Returns 0 on success, -1 on failure.
3095
+ */
3096
+ NPY_NO_EXPORT int
3097
+ convert_pyobjects_to_datetimes(int count,
3098
+ PyObject **objs, int *type_nums,
3099
+ NPY_CASTING casting,
3100
+ npy_int64 *out_values,
3101
+ PyArray_DatetimeMetaData *inout_meta)
3102
+ {
3103
+ int i, is_out_strict;
3104
+ PyArray_DatetimeMetaData *meta;
3105
+
3106
+ /* No values trivially succeeds */
3107
+ if (count == 0) {
3108
+ return 0;
3109
+ }
3110
+
3111
+ /* Use the inputs to resolve the unit metadata if requested */
3112
+ if (inout_meta->base == -1) {
3113
+ /* Allocate an array of metadata corresponding to the objects */
3114
+ meta = PyArray_malloc(count * sizeof(PyArray_DatetimeMetaData));
3115
+ if (meta == NULL) {
3116
+ PyErr_NoMemory();
3117
+ return -1;
3118
+ }
3119
+
3120
+ /* Convert all the objects into timedeltas or datetimes */
3121
+ for (i = 0; i < count; ++i) {
3122
+ meta[i].base = -1;
3123
+ meta[i].num = 1;
3124
+
3125
+ /* NULL -> NaT */
3126
+ if (objs[i] == NULL) {
3127
+ out_values[i] = NPY_DATETIME_NAT;
3128
+ meta[i].base = NPY_FR_GENERIC;
3129
+ }
3130
+ else if (type_nums[i] == NPY_DATETIME) {
3131
+ if (convert_pyobject_to_datetime(&meta[i], objs[i],
3132
+ casting, &out_values[i]) < 0) {
3133
+ PyArray_free(meta);
3134
+ return -1;
3135
+ }
3136
+ }
3137
+ else if (type_nums[i] == NPY_TIMEDELTA) {
3138
+ if (convert_pyobject_to_timedelta(&meta[i], objs[i],
3139
+ casting, &out_values[i]) < 0) {
3140
+ PyArray_free(meta);
3141
+ return -1;
3142
+ }
3143
+ }
3144
+ else {
3145
+ PyErr_SetString(PyExc_ValueError,
3146
+ "convert_pyobjects_to_datetimes requires that "
3147
+ "all the type_nums provided be datetime or timedelta");
3148
+ PyArray_free(meta);
3149
+ return -1;
3150
+ }
3151
+ }
3152
+
3153
+ /* Merge all the metadatas, starting with the first one */
3154
+ *inout_meta = meta[0];
3155
+ is_out_strict = (type_nums[0] == NPY_TIMEDELTA);
3156
+
3157
+ for (i = 1; i < count; ++i) {
3158
+ if (compute_datetime_metadata_greatest_common_divisor(
3159
+ &meta[i], inout_meta, inout_meta,
3160
+ type_nums[i] == NPY_TIMEDELTA,
3161
+ is_out_strict) < 0) {
3162
+ PyArray_free(meta);
3163
+ return -1;
3164
+ }
3165
+ is_out_strict = is_out_strict || (type_nums[i] == NPY_TIMEDELTA);
3166
+ }
3167
+
3168
+ /* Convert all the values into the resolved unit metadata */
3169
+ for (i = 0; i < count; ++i) {
3170
+ if (type_nums[i] == NPY_DATETIME) {
3171
+ if (cast_datetime_to_datetime(&meta[i], inout_meta,
3172
+ out_values[i], &out_values[i]) < 0) {
3173
+ PyArray_free(meta);
3174
+ return -1;
3175
+ }
3176
+ }
3177
+ else if (type_nums[i] == NPY_TIMEDELTA) {
3178
+ if (cast_timedelta_to_timedelta(&meta[i], inout_meta,
3179
+ out_values[i], &out_values[i]) < 0) {
3180
+ PyArray_free(meta);
3181
+ return -1;
3182
+ }
3183
+ }
3184
+ }
3185
+
3186
+ PyArray_free(meta);
3187
+ }
3188
+ /* Otherwise convert to the provided unit metadata */
3189
+ else {
3190
+ /* Convert all the objects into timedeltas or datetimes */
3191
+ for (i = 0; i < count; ++i) {
3192
+ /* NULL -> NaT */
3193
+ if (objs[i] == NULL) {
3194
+ out_values[i] = NPY_DATETIME_NAT;
3195
+ }
3196
+ else if (type_nums[i] == NPY_DATETIME) {
3197
+ if (convert_pyobject_to_datetime(inout_meta, objs[i],
3198
+ casting, &out_values[i]) < 0) {
3199
+ return -1;
3200
+ }
3201
+ }
3202
+ else if (type_nums[i] == NPY_TIMEDELTA) {
3203
+ if (convert_pyobject_to_timedelta(inout_meta, objs[i],
3204
+ casting, &out_values[i]) < 0) {
3205
+ return -1;
3206
+ }
3207
+ }
3208
+ else {
3209
+ PyErr_SetString(PyExc_ValueError,
3210
+ "convert_pyobjects_to_datetimes requires that "
3211
+ "all the type_nums provided be datetime or timedelta");
3212
+ return -1;
3213
+ }
3214
+ }
3215
+ }
3216
+
3217
+ return 0;
3218
+ }
3219
+
3220
+ NPY_NO_EXPORT PyArrayObject *
3221
+ datetime_arange(PyObject *start, PyObject *stop, PyObject *step,
3222
+ PyArray_Descr *dtype)
3223
+ {
3224
+ PyArray_DatetimeMetaData meta;
3225
+ /*
3226
+ * Both datetime and timedelta are stored as int64, so they can
3227
+ * share value variables.
3228
+ */
3229
+ npy_int64 values[3];
3230
+ PyObject *objs[3];
3231
+ int type_nums[3];
3232
+
3233
+ npy_intp i, length;
3234
+ PyArrayObject *ret;
3235
+ npy_int64 *ret_data;
3236
+
3237
+ /*
3238
+ * First normalize the input parameters so there is no Py_None,
3239
+ * and start is moved to stop if stop is unspecified.
3240
+ */
3241
+ if (step == Py_None) {
3242
+ step = NULL;
3243
+ }
3244
+ if (stop == NULL || stop == Py_None) {
3245
+ stop = start;
3246
+ start = NULL;
3247
+ /* If start was NULL or None, raise an exception */
3248
+ if (stop == NULL || stop == Py_None) {
3249
+ PyErr_SetString(PyExc_ValueError,
3250
+ "arange needs at least a stopping value");
3251
+ return NULL;
3252
+ }
3253
+ }
3254
+ if (start == Py_None) {
3255
+ start = NULL;
3256
+ }
3257
+
3258
+ /* Step must not be a Datetime */
3259
+ if (step != NULL && is_any_numpy_datetime(step)) {
3260
+ PyErr_SetString(PyExc_ValueError,
3261
+ "cannot use a datetime as a step in arange");
3262
+ return NULL;
3263
+ }
3264
+
3265
+ /* Check if the units of the given dtype are generic, in which
3266
+ * case we use the code path that detects the units
3267
+ */
3268
+ if (dtype != NULL) {
3269
+ PyArray_DatetimeMetaData *meta_tmp;
3270
+
3271
+ type_nums[0] = dtype->type_num;
3272
+ if (type_nums[0] != NPY_DATETIME && type_nums[0] != NPY_TIMEDELTA) {
3273
+ PyErr_SetString(PyExc_ValueError,
3274
+ "datetime_arange was given a non-datetime dtype");
3275
+ return NULL;
3276
+ }
3277
+
3278
+ meta_tmp = get_datetime_metadata_from_dtype(dtype);
3279
+ if (meta_tmp == NULL) {
3280
+ return NULL;
3281
+ }
3282
+
3283
+ /*
3284
+ * If the dtype specified is in generic units, detect the
3285
+ * units from the input parameters.
3286
+ */
3287
+ if (meta_tmp->base == NPY_FR_GENERIC) {
3288
+ dtype = NULL;
3289
+ meta.base = -1;
3290
+ }
3291
+ /* Otherwise use the provided metadata */
3292
+ else {
3293
+ meta = *meta_tmp;
3294
+ }
3295
+ }
3296
+ else {
3297
+ if ((start && is_any_numpy_datetime(start)) ||
3298
+ is_any_numpy_datetime(stop)) {
3299
+ type_nums[0] = NPY_DATETIME;
3300
+ }
3301
+ else {
3302
+ type_nums[0] = NPY_TIMEDELTA;
3303
+ }
3304
+
3305
+ meta.base = -1;
3306
+ }
3307
+
3308
+ if (type_nums[0] == NPY_DATETIME && start == NULL) {
3309
+ PyErr_SetString(PyExc_ValueError,
3310
+ "arange requires both a start and a stop for "
3311
+ "NumPy datetime64 ranges");
3312
+ return NULL;
3313
+ }
3314
+
3315
+ /* Set up to convert the objects to a common datetime unit metadata */
3316
+ objs[0] = start;
3317
+ objs[1] = stop;
3318
+ objs[2] = step;
3319
+ if (type_nums[0] == NPY_TIMEDELTA) {
3320
+ type_nums[1] = NPY_TIMEDELTA;
3321
+ type_nums[2] = NPY_TIMEDELTA;
3322
+ }
3323
+ else {
3324
+ if (PyInt_Check(objs[1]) ||
3325
+ PyLong_Check(objs[1]) ||
3326
+ PyArray_IsScalar(objs[1], Integer) ||
3327
+ is_any_numpy_timedelta(objs[1])) {
3328
+ type_nums[1] = NPY_TIMEDELTA;
3329
+ }
3330
+ else {
3331
+ type_nums[1] = NPY_DATETIME;
3332
+ }
3333
+ type_nums[2] = NPY_TIMEDELTA;
3334
+ }
3335
+
3336
+ /* Convert all the arguments */
3337
+ if (convert_pyobjects_to_datetimes(3, objs, type_nums,
3338
+ NPY_SAME_KIND_CASTING, values, &meta) < 0) {
3339
+ return NULL;
3340
+ }
3341
+
3342
+ /* If no step was provided, default to 1 */
3343
+ if (step == NULL) {
3344
+ values[2] = 1;
3345
+ }
3346
+
3347
+ /*
3348
+ * In the case of arange(datetime, timedelta), convert
3349
+ * the timedelta into a datetime by adding the start datetime.
3350
+ */
3351
+ if (type_nums[0] == NPY_DATETIME && type_nums[1] == NPY_TIMEDELTA) {
3352
+ values[1] += values[0];
3353
+ }
3354
+
3355
+ /* Now start, stop, and step have their values and matching metadata */
3356
+ if (values[0] == NPY_DATETIME_NAT ||
3357
+ values[1] == NPY_DATETIME_NAT ||
3358
+ values[2] == NPY_DATETIME_NAT) {
3359
+ PyErr_SetString(PyExc_ValueError,
3360
+ "arange: cannot use NaT (not-a-time) datetime values");
3361
+ return NULL;
3362
+ }
3363
+
3364
+ /* Calculate the array length */
3365
+ if (values[2] > 0 && values[1] > values[0]) {
3366
+ length = (values[1] - values[0] + (values[2] - 1)) / values[2];
3367
+ }
3368
+ else if (values[2] < 0 && values[1] < values[0]) {
3369
+ length = (values[1] - values[0] + (values[2] + 1)) / values[2];
3370
+ }
3371
+ else if (values[2] != 0) {
3372
+ length = 0;
3373
+ }
3374
+ else {
3375
+ PyErr_SetString(PyExc_ValueError,
3376
+ "arange: step cannot be zero");
3377
+ return NULL;
3378
+ }
3379
+
3380
+ /* Create the dtype of the result */
3381
+ if (dtype != NULL) {
3382
+ Py_INCREF(dtype);
3383
+ }
3384
+ else {
3385
+ dtype = create_datetime_dtype(type_nums[0], &meta);
3386
+ if (dtype == NULL) {
3387
+ return NULL;
3388
+ }
3389
+ }
3390
+
3391
+ /* Create the result array */
3392
+ ret = (PyArrayObject *)PyArray_NewFromDescr(
3393
+ &PyArray_Type, dtype, 1, &length, NULL,
3394
+ NULL, 0, NULL);
3395
+ if (ret == NULL) {
3396
+ return NULL;
3397
+ }
3398
+
3399
+ if (length > 0) {
3400
+ /* Extract the data pointer */
3401
+ ret_data = (npy_int64 *)PyArray_DATA(ret);
3402
+
3403
+ /* Create the timedeltas or datetimes */
3404
+ for (i = 0; i < length; ++i) {
3405
+ *ret_data = values[0];
3406
+ values[0] += values[2];
3407
+ ret_data++;
3408
+ }
3409
+ }
3410
+
3411
+ return ret;
3412
+ }
3413
+
3414
+ /*
3415
+ * Examines all the strings in the given string array, and parses them
3416
+ * to find the right metadata.
3417
+ *
3418
+ * Returns 0 on success, -1 on failure.
3419
+ */
3420
+ static int
3421
+ find_string_array_datetime64_type(PyArrayObject *arr,
3422
+ PyArray_DatetimeMetaData *meta)
3423
+ {
3424
+ NpyIter* iter;
3425
+ NpyIter_IterNextFunc *iternext;
3426
+ char **dataptr;
3427
+ npy_intp *strideptr, *innersizeptr;
3428
+ PyArray_Descr *string_dtype;
3429
+ int maxlen;
3430
+ char *tmp_buffer = NULL;
3431
+
3432
+ npy_datetimestruct dts;
3433
+ PyArray_DatetimeMetaData tmp_meta;
3434
+
3435
+ /* Handle zero-sized arrays specially */
3436
+ if (PyArray_SIZE(arr) == 0) {
3437
+ return 0;
3438
+ }
3439
+
3440
+ string_dtype = PyArray_DescrFromType(NPY_STRING);
3441
+ if (string_dtype == NULL) {
3442
+ return -1;
3443
+ }
3444
+
3445
+ /* Use unsafe casting to allow unicode -> ascii string */
3446
+ iter = NpyIter_New((PyArrayObject *)arr,
3447
+ NPY_ITER_READONLY|
3448
+ NPY_ITER_EXTERNAL_LOOP|
3449
+ NPY_ITER_BUFFERED,
3450
+ NPY_KEEPORDER, NPY_UNSAFE_CASTING,
3451
+ string_dtype);
3452
+ Py_DECREF(string_dtype);
3453
+ if (iter == NULL) {
3454
+ return -1;
3455
+ }
3456
+
3457
+ iternext = NpyIter_GetIterNext(iter, NULL);
3458
+ if (iternext == NULL) {
3459
+ NpyIter_Deallocate(iter);
3460
+ return -1;
3461
+ }
3462
+ dataptr = NpyIter_GetDataPtrArray(iter);
3463
+ strideptr = NpyIter_GetInnerStrideArray(iter);
3464
+ innersizeptr = NpyIter_GetInnerLoopSizePtr(iter);
3465
+
3466
+ /* Get the resulting string length */
3467
+ maxlen = NpyIter_GetDescrArray(iter)[0]->elsize;
3468
+
3469
+ /* Allocate a buffer for strings which fill the buffer completely */
3470
+ tmp_buffer = PyArray_malloc(maxlen+1);
3471
+ if (tmp_buffer == NULL) {
3472
+ PyErr_NoMemory();
3473
+ NpyIter_Deallocate(iter);
3474
+ return -1;
3475
+ }
3476
+
3477
+ /* The iteration loop */
3478
+ do {
3479
+ /* Get the inner loop data/stride/count values */
3480
+ char* data = *dataptr;
3481
+ npy_intp stride = *strideptr;
3482
+ npy_intp count = *innersizeptr;
3483
+ char *tmp;
3484
+
3485
+ /* The inner loop */
3486
+ while (count--) {
3487
+ /* Replicating strnlen with memchr, because Mac OS X lacks it */
3488
+ tmp = memchr(data, '\0', maxlen);
3489
+
3490
+ /* If the string is all full, use the buffer */
3491
+ if (tmp == NULL) {
3492
+ memcpy(tmp_buffer, data, maxlen);
3493
+ tmp_buffer[maxlen] = '\0';
3494
+
3495
+ tmp_meta.base = -1;
3496
+ if (parse_iso_8601_datetime(tmp_buffer, maxlen, -1,
3497
+ NPY_UNSAFE_CASTING, &dts, NULL,
3498
+ &tmp_meta.base, NULL) < 0) {
3499
+ goto fail;
3500
+ }
3501
+ }
3502
+ /* Otherwise parse the data in place */
3503
+ else {
3504
+ tmp_meta.base = -1;
3505
+ if (parse_iso_8601_datetime(data, tmp - data, -1,
3506
+ NPY_UNSAFE_CASTING, &dts, NULL,
3507
+ &tmp_meta.base, NULL) < 0) {
3508
+ goto fail;
3509
+ }
3510
+ }
3511
+
3512
+ tmp_meta.num = 1;
3513
+ /* Combine it with 'meta' */
3514
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3515
+ &tmp_meta, meta, 0, 0) < 0) {
3516
+ goto fail;
3517
+ }
3518
+
3519
+
3520
+ data += stride;
3521
+ }
3522
+ } while(iternext(iter));
3523
+
3524
+ PyArray_free(tmp_buffer);
3525
+ NpyIter_Deallocate(iter);
3526
+
3527
+ return 0;
3528
+
3529
+ fail:
3530
+ PyArray_free(tmp_buffer);
3531
+ NpyIter_Deallocate(iter);
3532
+
3533
+ return -1;
3534
+ }
3535
+
3536
+
3537
+ /*
3538
+ * Recursively determines the metadata for an NPY_DATETIME dtype.
3539
+ *
3540
+ * Returns 0 on success, -1 on failure.
3541
+ */
3542
+ static int
3543
+ recursive_find_object_datetime64_type(PyObject *obj,
3544
+ PyArray_DatetimeMetaData *meta)
3545
+ {
3546
+ /* Array -> use its metadata */
3547
+ if (PyArray_Check(obj)) {
3548
+ PyArrayObject *arr = (PyArrayObject *)obj;
3549
+ PyArray_Descr *arr_dtype = PyArray_DESCR(arr);
3550
+
3551
+ if (arr_dtype->type_num == NPY_STRING ||
3552
+ arr_dtype->type_num == NPY_UNICODE) {
3553
+ return find_string_array_datetime64_type(arr, meta);
3554
+ }
3555
+ /* If the array has metadata, use it */
3556
+ else if (arr_dtype->type_num == NPY_DATETIME ||
3557
+ arr_dtype->type_num == NPY_TIMEDELTA) {
3558
+ PyArray_DatetimeMetaData *tmp_meta;
3559
+
3560
+ /* Get the metadata from the type */
3561
+ tmp_meta = get_datetime_metadata_from_dtype(arr_dtype);
3562
+ if (tmp_meta == NULL) {
3563
+ return -1;
3564
+ }
3565
+
3566
+ /* Combine it with 'meta' */
3567
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3568
+ tmp_meta, meta, 0, 0) < 0) {
3569
+ return -1;
3570
+ }
3571
+
3572
+ return 0;
3573
+ }
3574
+ /* If it's not an object array, stop looking */
3575
+ else if (arr_dtype->type_num != NPY_OBJECT) {
3576
+ return 0;
3577
+ }
3578
+ }
3579
+ /* Datetime scalar -> use its metadata */
3580
+ else if (PyArray_IsScalar(obj, Datetime)) {
3581
+ PyDatetimeScalarObject *dts = (PyDatetimeScalarObject *)obj;
3582
+
3583
+ /* Combine it with 'meta' */
3584
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3585
+ &dts->obmeta, meta, 0, 0) < 0) {
3586
+ return -1;
3587
+ }
3588
+
3589
+ return 0;
3590
+ }
3591
+ /* String -> parse it to find out */
3592
+ else if (PyBytes_Check(obj) || PyUnicode_Check(obj)) {
3593
+ npy_datetime tmp = 0;
3594
+ PyArray_DatetimeMetaData tmp_meta;
3595
+
3596
+ tmp_meta.base = -1;
3597
+ tmp_meta.num = 1;
3598
+
3599
+ if (convert_pyobject_to_datetime(&tmp_meta, obj,
3600
+ NPY_UNSAFE_CASTING, &tmp) < 0) {
3601
+ /* If it's a value error, clear the error */
3602
+ if (PyErr_Occurred() &&
3603
+ PyErr_GivenExceptionMatches(PyErr_Occurred(),
3604
+ PyExc_ValueError)) {
3605
+ PyErr_Clear();
3606
+ return 0;
3607
+ }
3608
+ /* Otherwise propagate the error */
3609
+ else {
3610
+ return -1;
3611
+ }
3612
+ }
3613
+
3614
+ /* Combine it with 'meta' */
3615
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3616
+ &tmp_meta, meta, 0, 0) < 0) {
3617
+ return -1;
3618
+ }
3619
+
3620
+ return 0;
3621
+ }
3622
+ /* Python date object -> 'D' */
3623
+ else if (PyDate_Check(obj)) {
3624
+ PyArray_DatetimeMetaData tmp_meta;
3625
+
3626
+ tmp_meta.base = NPY_FR_D;
3627
+ tmp_meta.num = 1;
3628
+
3629
+ /* Combine it with 'meta' */
3630
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3631
+ &tmp_meta, meta, 0, 0) < 0) {
3632
+ return -1;
3633
+ }
3634
+
3635
+ return 0;
3636
+ }
3637
+ /* Python datetime object -> 'us' */
3638
+ else if (PyDateTime_Check(obj)) {
3639
+ PyArray_DatetimeMetaData tmp_meta;
3640
+
3641
+ tmp_meta.base = NPY_FR_us;
3642
+ tmp_meta.num = 1;
3643
+
3644
+ /* Combine it with 'meta' */
3645
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3646
+ &tmp_meta, meta, 0, 0) < 0) {
3647
+ return -1;
3648
+ }
3649
+
3650
+ return 0;
3651
+ }
3652
+
3653
+ /* Now check if what we have left is a sequence for recursion */
3654
+ if (PySequence_Check(obj)) {
3655
+ Py_ssize_t i, len = PySequence_Size(obj);
3656
+ if (len < 0 && PyErr_Occurred()) {
3657
+ return -1;
3658
+ }
3659
+
3660
+ for (i = 0; i < len; ++i) {
3661
+ PyObject *f = PySequence_GetItem(obj, i);
3662
+ if (f == NULL) {
3663
+ return -1;
3664
+ }
3665
+ if (f == obj) {
3666
+ Py_DECREF(f);
3667
+ return 0;
3668
+ }
3669
+ if (recursive_find_object_datetime64_type(f, meta) < 0) {
3670
+ Py_DECREF(f);
3671
+ return -1;
3672
+ }
3673
+ Py_DECREF(f);
3674
+ }
3675
+
3676
+ return 0;
3677
+ }
3678
+ /* Otherwise ignore it */
3679
+ else {
3680
+ return 0;
3681
+ }
3682
+ }
3683
+
3684
+ /*
3685
+ * Recursively determines the metadata for an NPY_TIMEDELTA dtype.
3686
+ *
3687
+ * Returns 0 on success, -1 on failure.
3688
+ */
3689
+ static int
3690
+ recursive_find_object_timedelta64_type(PyObject *obj,
3691
+ PyArray_DatetimeMetaData *meta)
3692
+ {
3693
+ /* Array -> use its metadata */
3694
+ if (PyArray_Check(obj)) {
3695
+ PyArrayObject *arr = (PyArrayObject *)obj;
3696
+ PyArray_Descr *arr_dtype = PyArray_DESCR(arr);
3697
+
3698
+ /* If the array has metadata, use it */
3699
+ if (arr_dtype->type_num == NPY_DATETIME ||
3700
+ arr_dtype->type_num == NPY_TIMEDELTA) {
3701
+ PyArray_DatetimeMetaData *tmp_meta;
3702
+
3703
+ /* Get the metadata from the type */
3704
+ tmp_meta = get_datetime_metadata_from_dtype(arr_dtype);
3705
+ if (tmp_meta == NULL) {
3706
+ return -1;
3707
+ }
3708
+
3709
+ /* Combine it with 'meta' */
3710
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3711
+ tmp_meta, meta, 0, 0) < 0) {
3712
+ return -1;
3713
+ }
3714
+
3715
+ return 0;
3716
+ }
3717
+ /* If it's not an object array, stop looking */
3718
+ else if (arr_dtype->type_num != NPY_OBJECT) {
3719
+ return 0;
3720
+ }
3721
+ }
3722
+ /* Datetime scalar -> use its metadata */
3723
+ else if (PyArray_IsScalar(obj, Timedelta)) {
3724
+ PyTimedeltaScalarObject *dts = (PyTimedeltaScalarObject *)obj;
3725
+
3726
+ /* Combine it with 'meta' */
3727
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3728
+ &dts->obmeta, meta, 1, 1) < 0) {
3729
+ return -1;
3730
+ }
3731
+
3732
+ return 0;
3733
+ }
3734
+ /* String -> parse it to find out */
3735
+ else if (PyBytes_Check(obj) || PyUnicode_Check(obj)) {
3736
+ /* No timedelta parser yet */
3737
+ return 0;
3738
+ }
3739
+ /* Python timedelta object -> 'us' */
3740
+ else if (PyDelta_Check(obj)) {
3741
+ PyArray_DatetimeMetaData tmp_meta;
3742
+
3743
+ tmp_meta.base = NPY_FR_us;
3744
+ tmp_meta.num = 1;
3745
+
3746
+ /* Combine it with 'meta' */
3747
+ if (compute_datetime_metadata_greatest_common_divisor(meta,
3748
+ &tmp_meta, meta, 0, 0) < 0) {
3749
+ return -1;
3750
+ }
3751
+
3752
+ return 0;
3753
+ }
3754
+
3755
+ /* Now check if what we have left is a sequence for recursion */
3756
+ if (PySequence_Check(obj)) {
3757
+ Py_ssize_t i, len = PySequence_Size(obj);
3758
+ if (len < 0 && PyErr_Occurred()) {
3759
+ return -1;
3760
+ }
3761
+
3762
+ for (i = 0; i < len; ++i) {
3763
+ PyObject *f = PySequence_GetItem(obj, i);
3764
+ if (f == NULL) {
3765
+ return -1;
3766
+ }
3767
+ if (f == obj) {
3768
+ Py_DECREF(f);
3769
+ return 0;
3770
+ }
3771
+ if (recursive_find_object_timedelta64_type(f, meta) < 0) {
3772
+ Py_DECREF(f);
3773
+ return -1;
3774
+ }
3775
+ Py_DECREF(f);
3776
+ }
3777
+
3778
+ return 0;
3779
+ }
3780
+ /* Otherwise ignore it */
3781
+ else {
3782
+ return 0;
3783
+ }
3784
+ }
3785
+
3786
+ /*
3787
+ * Examines all the objects in the given Python object by
3788
+ * recursively descending the sequence structure. Returns a
3789
+ * datetime or timedelta type with metadata based on the data.
3790
+ */
3791
+ NPY_NO_EXPORT PyArray_Descr *
3792
+ find_object_datetime_type(PyObject *obj, int type_num)
3793
+ {
3794
+ PyArray_DatetimeMetaData meta;
3795
+
3796
+ meta.base = NPY_FR_GENERIC;
3797
+ meta.num = 1;
3798
+
3799
+ if (type_num == NPY_DATETIME) {
3800
+ if (recursive_find_object_datetime64_type(obj, &meta) < 0) {
3801
+ return NULL;
3802
+ }
3803
+ else {
3804
+ return create_datetime_dtype(type_num, &meta);
3805
+ }
3806
+ }
3807
+ else if (type_num == NPY_TIMEDELTA) {
3808
+ if (recursive_find_object_timedelta64_type(obj, &meta) < 0) {
3809
+ return NULL;
3810
+ }
3811
+ else {
3812
+ return create_datetime_dtype(type_num, &meta);
3813
+ }
3814
+ }
3815
+ else {
3816
+ PyErr_SetString(PyExc_ValueError,
3817
+ "find_object_datetime_type needs a datetime or "
3818
+ "timedelta type number");
3819
+ return NULL;
3820
+ }
3821
+ }