10000 Maintenance/1.10.x by chiffa · Pull Request #7354 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Maintenance/1.10.x #7354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 288 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
c1f1115
Merge pull request #6223 from rgommers/bport-6211
charris Aug 20, 2015
10c3eb0
BLD: fix compiler_cxx check failure
yolanda15 Aug 21, 2015
40669f5
BUG: fix 32-bit arch flag for Intel Fortran compiler.
rgommers Aug 5, 2015
059e415
BUG: fix typo which fused two compile flags on Windows for GFortran.
rgommers Aug 5, 2015
2e20e96
Merge pull request #6228 from charris/backport-compiler-fixes
charris Aug 21, 2015
87134ec
Changed the module name from 'np' to 'numpy' since the name 'np' was …
jamescam Aug 18, 2015
d5673d4
Merge pull request #6233 from charris/backport-gh-6218
charris Aug 22, 2015
52dbbd8
BUG: Checking advanced indices could fail for some arrays
seberg Aug 25, 2015
b3e390c
DOC: Add warning that the InnerStridesArray may change.
seberg Aug 25, 2015
256761f
Merge pull request #6249 from charris/backport-gh-6245
charris Aug 26, 2015
b49adda
Merge pull request #6252 from juliantaylor/comp-alias
juliantaylor Aug 26, 2015
2c74891
BUG: Fix refcounting for string comparison in array_richcompare
njsmith Aug 27, 2015
3e41359
Merge pull request #6259 from charris/backport-gh-6254
charris Aug 27, 2015
6bc9555
BUG: fix timedelta arithmetic with invalid values or NaTs
pitrou Sep 1, 2015
11ad7b8
Merge pull request #6277 from charris/backport-gh-6275
charris Sep 1, 2015
3078680
Merge pull request #6151 from charris/make-bad-strides-reasonable
charris Sep 13, 2015
8bf83c4
Added closing for 'so_dup' and 'se_dup' file descriptors.
dmitrii-zagornyi Sep 14, 2015
7cba81b
MSVCCompiler overwrite 'lib' and 'include' environment variables. This
dmitrii-zagornyi Sep 14, 2015
c628401
Fixed issue: SciPy can't be build in case, if python was installed into
dmitrii-zagornyi Sep 14, 2015
ed6e960
Align with pep8
dmitrii-zagornyi Sep 14, 2015
4cc0dda
Changed from distutils_MSVCCompiler to
dmitrii-zagornyi Sep 14, 2015
bc00899
ENH: enabled extra_link_args in OpenBLAS segment
zerothi Sep 17, 2015
daa9324
Merge pull request #6340 from charris/backport-gh-6243
charris Sep 22, 2015
128a0e9
Merge pull request #6341 from charris/backport-gh-6328
charris Sep 22, 2015
95f6ddc
BUG: PEP440 compliant versioning for development releases.
charris Sep 23, 2015
e1ccd7c
BUG: Add cblasfuncs.c and python_xerbla.c to MANIFEST.in
charris Sep 23, 2015
d8bd7fb
TST: Update test__version.py.
charris Sep 24, 2015
00ca7ea
Merge pull request #6363 from charris/fix-sdist-missing-files
charris Sep 25, 2015
8f4b4f1
BUG,ENH: allow linalg.cond to work on a stack of matrices
seberg Sep 25, 2015
086a886
Merge pull request #6369 from charris/backport-gh-6362
charris Sep 27, 2015
7f434e7
BUG: Fix vdot for uncontiguous arrays.
seberg Sep 27, 2015
38a8756
Merge pull request #6374 from charris/backport-gh-6373
charris Sep 27, 2015
876b580
REV: Make sure ravel returns a contiguous array
seberg Sep 27, 2015
459f44a
DOC: Document behaviour of ravel more clearly
seberg Sep 27, 2015
79ed6ee
BUG: Expanded warning conditions for array_split
Apr 17, 2015
2a3ac6f
TST: Test empty warning for split with manual inputs
seberg Sep 27, 2015
77fb742
Merge pull request #6375 from charris/backport-gh-6372
charris Sep 27, 2015
a600a5c
Merge pull request #6376 from charris/backport-gh-6361
charris Sep 27, 2015
c0d0947
FutureWarning for np.full(..., non-float).
anntzer Sep 28, 2015
8c6fd7a
Merge pull request #6383 from charris/backport-gh-6382
charris Sep 28, 2015
9a66826
TST: Add tests for np.full FutureWarning.
anntzer Sep 28, 2015
aa8adf4
Merge pull request #6385 from charris/backport-gh-6384
charris Sep 28, 2015
5495721
BUG: Fix PyObject_Cmp in npy_3kcompat.h.
charris Sep 28, 2015
9871ed4
Merge pull request #6386 from charris/backport-PyObject_Cmp-fix
charris Sep 29, 2015
549a777
BLD: Update pavement.py LOG_START and LOG_END
charris Sep 29, 2015
72991a5
Merge pull request #6389 from charris/update-pavement
charris Sep 29, 2015
fa185c7
BUG: Guarantee non-zero is 1 for switch statements
Sep 23, 2015
9f0ae61
Merge pull request #6397 from charris/backport-gh-6346
charris Oct 1, 2015
78497f4
DOC: Sync 1.10.0-notes.rst in 1.10.x branch with master.
charris Oct 6, 2015
a0dc066
Merge pull request #6416 from charris/update-1.10.0-notes
charris Oct 6, 2015
c38bc08
DOC: fix var. reference in percentile docstring
megies Oct 6, 2015
83aff24
Merge pull request #6417 from megies/patch-1
charris Oct 6, 2015
15cb66f
BLD: do not build exclusively for SSE4.2 processors
cgohlke Oct 9, 2015
d6564cb
BLD: do not build exclusively for SSE4.2 processors
cgohlke Oct 9, 2015
b5c590b
Merge pull request #6442 from charris/backport-gh-6441
charris Oct 10, 2015
dcbc4cc
MAINT: remove Wreturn-type warnings from config checks
juliantaylor Oct 9, 2015
050fc72
Merge pull request #6443 from charris/backport-gh-6436
charris Oct 10, 2015
49fa187
BLD: enable SSE2 for 32-bit msvc 9 and 10 compilers
cgohlke Oct 9, 2015
826716f
DOC: Document the reason msvc requires SSE2 on 32 bit platforms.
charris Oct 10, 2015
04211c6
BUG: mask nan to 1 in ordered compare
juliantaylor Oct 9, 2015
4fab8fd
Merge pull request #6446 from charris/backport-gh-6444
charris Oct 11, 2015
0321723
Merge pull request #6447 from charris/backport-6438
charris Oct 11, 2015
0c1a5df
BLD: import setuptools to allow compile with VS2008 python2.7 sdk
juliantaylor Oct 9, 2015
456ec0e
Merge pull request #6448 from charris/backport-gh-6439
charris Oct 11, 2015
45a3d84
DEP: Remove warning for `full` when dtype is set.
anntzer Oct 11, 2015
af8f282
Merge pull request #6450 from charris/backport-gh-449
charris Oct 12, 2015
0d6d986
DOC: Create 1.10.1 release notes.
charris Oct 11, 2015
afda335
Merge pull request #6457 from charris/release-notes-1.10.1
charris Oct 12, 2015
9979599
TST: fix forgotten change of not creating errors from test warnings i…
rgommers Oct 12, 2015
2684958
Merge pull request #6461 from rgommers/scipy-5331-testwarn
charris Oct 12, 2015
ab8c3da
LIBPATH with spaces is now supported Python 2.7+ and Win32
mindw Apr 13, 2015
f0b4d21
Merge pull request #6482 from charris/backport-gh-6481
charris Oct 16, 2015
b68aea4
BUG: Fix Intel compiler flags for OS X build
Oct 15, 2015
d195f4d
REL: update Paver file to ensure sdist contents are OK for releases.
rgommers Oct 14, 2015
54363d6
REL: remove release.sh because it's not in use anymore.
rgommers Oct 14, 2015
c0495e7
TST: raise errors for dev versions and warnings for releases on test …
rgommers Oct 14, 2015
84b7f73
MAINT: Use Python 3.5 instead of 3.5-dev for travis 3.5 testing.
charris Oct 14, 2015
c538909
Update __init__.py
behrisch Oct 4, 2015
0b27f9c
Merge pull request #6483 from charris/backport-6474
charris Oct 16, 2015
5ee3dfb
Merge pull request #6484 from charris/backport-6478
charris Oct 16, 2015
af30c43
Merge pull request #6485 from charris/backport-6472
charris Oct 16, 2015
4d0e060
Merge pull request #6486 from charris/backport-6460
charris Oct 16, 2015
57c0ca4
BUG: allow extension of common blocks in numpy.f2py
2sn Sep 12, 2015
308204f
MAINT: Spellcheck doc/source/f2py/signature-file.rst.
charris Oct 15, 2015
c08359a
BUG: Allow nested use of parameters for array dimensions in f2py.
2sn Sep 12, 2015
649c2fe
Merge pull request #6490 from charris/backport-6487
charris Oct 16, 2015
e05ee17
Merge pull request #6489 from charris/backport-6488
charris Oct 16, 2015
c49289a
DOC: Mention that default casting for inplace operations has changed.
charris Oct 18, 2015
9f19a89
MAINT: Speedup field access by removing unneeded safety checks (1/3)
ahaldane Aug 12, 2015
4cd3326
MAINT: Speedup field access by removing unneeded safety checks (2/3)
ahaldane Aug 14, 2015
f126564
MAINT: Speedup field access by removing unneeded safety checks (3/3)
ahaldane Aug 14, 2015
f90fbb9
BUG: recarrays viewed as subarrays don't convert to np.record type
ahaldane Oct 17, 2015
deab3d5
TST: pytest traceback hide markers set for testing helpers
Apr 19, 2015
3b03ce3
10000 Merge pull request #6503 from charris/backport-6499
charris Oct 18, 2015
f9425b0
Merge pull request #6502 from charris/backport-6208
charris Oct 18, 2015
a307d81
Merge pull request #6504 from charris/backport-6500
charris Oct 18, 2015
caf5b01
Merge pull request #6505 from charris/backport-5773
charris Oct 18, 2015
5270a27
REL: add "make upload" command for built docs, update "make dist".
rgommers Oct 18, 2015
86a64d7
DOC: update HOWTO_BUILD_DOCS and HOWTO_RELEASE for release doc builds.
rgommers Oct 19, 2015
5c0c994
Merge pull request #6512 from charris/backport-6501
charris Oct 19, 2015
f2d9c13
Revert "Merge pull request #5614 from charris/cleanup-gh-5587"
charris Oct 20, 2015
4915668
MAINT: Keep test fix that came in with #5614.
charris Oct 20, 2015
b3c772c
Merge pull request #6536 from charris/revert-5614
charris Oct 20, 2015
07e3b3d
BUG: ma.masked_values does not shrink mask if requested
jjhelmus Oct 21, 2015
b1e5430
BUG: scalar argument to ma.atleast_* return arrays
jjhelmus Oct 21, 2015
c74be39
Merge pull request #6541 from charris/backport-6538
charris Oct 21, 2015
b41e69a
Merge pull request #6543 from charris/backport-6537
charris Oct 21, 2015
330c7d9
Do a TravisCI build with PYTHONOPTIMIZE=2
dsanders11 Oct 19, 2015
4db0754
Fix use of __doc__ in setup.py for -OO mode
dsanders11 Oct 19, 2015
e283ae7
Merge pull request #6544 from charris/backport-6526
charris Oct 21, 2015
04b16fd
BUG: Make median work for empty arrays (issue #6462)
ethankruse Oct 19, 2015
0eb1d4d
Merge pull request #6547 from charris/backport-6527
charris Oct 22, 2015
06fb562
BUG: fix inner() by copying if needed to enforce contiguity
alexbrc Oct 21, 2015
91093ff
Merge pull request #6552 from charris/backport-6546
charris Oct 23, 2015
d560a21
BUG: error in broadcast_arrays with as_strided array
shoyer Oct 24, 2015
8140eaf
Merge pull request #6557 from charris/backport-6556
charris Oct 24, 2015
040fe81
MAINT: minor update to "make upload" doc build command.
rgommers Oct 24, 2015
bbc687a
Merge pull request #6559 from charris/backport-6558
charris Oct 25, 2015
c6065c8
BUG: fix AttributeError in numpy/distutils.
groutr Oct 13, 2015
329de93
Merge pull request #6561 from rgommers/bport-6470
charris Oct 25, 2015
df1786f
BUG: Revert some import * fixes in f2py.
charris Oct 26, 2015
e0ca6c3
Merge pull request #6568 from charris/backport-6567
charris Oct 27, 2015
e3ec36b
TST: Remove tests of view safety checks (see next commit)
ahaldane Oct 26, 2015
f1eca4b
BUG: revert view safety checks
ahaldane Oct 26, 2015
2093126
Merge pull request #6570 from charris/backport-6562
charris Oct 27, 2015
120da4f
BUG: Fixed partition errors on empty input. Closes #6530
yashmehrotra Oct 26, 2015
9d0c247
TST: Added tests for empty partition and argpartition
yashmehrotra Oct 27, 2015
ac772b9
TST: Added regression test empty percentile, in ref to #6530 and #6553
yashmehrotra Oct 27, 2015
14735a8
Merge pull request #6573 from charris/backport-6553
charris Oct 27, 2015
398b08c
Revert "Merge pull request #6376 from charris/backport-gh-6361"
charris Oct 29, 2015
4c29ac4
MAINT: fix mistake in doc upload rule
pv Oct 29, 2015
7fe8a6b
Merge pull request #6580 from charris/backport-6579
charris Oct 29, 2015
a76c275
BUG: Fix for #6569, allowing build_ext --inplace
wackywendell Oct 28, 2015
b5da063
Merge pull request #6583 from rgommers/bport-6577
charris Oct 29, 2015
c6458c7
DOC: Release notes for Numpy 1.10.2.
charris Oct 27, 2015
3258cee
Merge pull request #6586 from charris/prepare-1.10.2-notes
charris Oct 30, 2015
e60d970
Merge pull request #6578 from charris/rollback-6371
charris Oct 30, 2015
2f431d1
BUG: Fix use of PyArray_ISFORTRAN in numpy.i.
charris Oct 31, 2015
5c9e67b
DOC: Update documentation for isfortran.
charris Oct 31, 2015
ad2d67f
DOC: Update 1.10.2 release notes to mention fix to numpy.i
charris Nov 2, 2015
b0eeb8c
Merge pull request #6604 from charris/backport-6596
charris Nov 2, 2015
c7f63bb
DOC: Update 1.10.2 release notes.
charris Nov 2, 2015
a276ca6
Merge pull request #6607 from charris/backport-6606
charris Nov 2, 2015
555b8c3
BUG: Add choice and dirichlet to numpy.random.__all__.
charris Nov 2, 2015
97cd681
Merge pull request #6615 from charris/update-random-all
charris Nov 2, 2015
ae38716
BUG: Fix swig make_fortran function.
charris Nov 3, 2015
9d4fbcf
Merge pull request #6626 from charris/fix-swig-make_fortran
charris Nov 4, 2015
08682e7
BUG: Make allclose return python bool.
charris Nov 4, 2015
333699e
DOC: Update 1.10.2 release notes for gh-6475 fix.
charris Nov 4, 2015
d2a2024
Merge pull request #6633 from charris/fix-allclose-return-type
charris Nov 5, 2015
7270995
ENH: make recarray.getitem return a recarray
ahaldane Nov 6, 2015
781a7c3
DOC: update 1.10.2 release notes with backport #6643.
charris Nov 6, 2015
31d780d
Merge pull request #6644 from charris/backport-6643
charris Nov 6, 2015
2cc1975
BUG: Fix memleak in _convert_from_dict
ahaldane Nov 6, 2015
f24e6b7
DOC: Update 1.10.2 release notes for #6642.
charris Nov 6, 2015
f6f2c5e
Merge pull request #6645 from charris/backport-6642
charris Nov 6, 2015
d8d27c3
STY: Minor style fixups.
charris Nov 7, 2015
14e9ceb
BUG, MAINT: Refactor ma.dot function and the corresponding method.
charris Nov 7, 2015
2f47d47
TST: Add tests for ma.dot.
charris Nov 7, 2015
70a3fdf
Merge pull request #6663 from charris/fix-ma-dot
charris Nov 11, 2015
08e14f7
DOC: Update 1.10.2-notes for rc1 release.
charris Nov 11, 2015
7b33273
Merge pull request #6664 from charris/update-1.10.2-notes
charris Nov 11, 2015
925e531
BUG: ma.make_mask should always return nomask for nomask argument.
charris Nov 11, 2015
0ab1014
DOC: Update 1.10.2-notes.
charris Nov 11, 2015
b984e84
Merge pull request #6674 from charris/backport-6668
charris Nov 12, 2015
ef96253
TST: test np.rint bug for large integers
matthew-brett Nov 18, 2015
a17815d
BUG: fix pointer arithmetic in _get_field_view
ahaldane Nov 19, 2015
dd095fa
Merge pull request #6700 from matthew-brett/test-rint-bug-backport
charris Nov 19, 2015
560e6ea
MAINT: fix spurious semicolon in macro definition of PyArray_FROM_OT
congma Nov 17, 2015
af5e749
BUG: fix removing tempdirs created during build
juliantaylor Nov 17, 2015
7cbdea3
BUG: testing: fix a bug in assert_string_equal
pv Nov 14, 2015
040ff5b
Merge pull request #6707 from charris/backport-6697
charris Nov 20, 2015
381d671
Merge pull request #6706 from charris/backport-6695
charris Nov 20, 2015
b684f41
Merge pull request #6705 from charris/backport-6686
charris Nov 20, 2015
340f779
MAINT: fix casting warnings in mapping.c
ahaldane Nov 19, 2015
76db1ab
Merge pull request #6703 from ahaldane/fix_getfield_p_arith1.10
charris Nov 24, 2015
104fd78
BUG: Readd fallback CBLAS detection on linux.
charris Nov 24, 2015
23fe495
Merge pull request #6730 from charris/backport-6717
charris Nov 25, 2015
43e7c8a
MAINT: Localize variables only used with relaxed stride checking.
charris Nov 25, 2015
4f38328
TST: Fix travis-ci test for numpy wheels.
charris Nov 25, 2015
408d994
Merge pull request #6731 from charris/backport-6726
charris Nov 26, 2015
da2df77
MAINT: Make no relaxed stride checking the default for 1.10.
charris Nov 24, 2015
3f743d2
BUG: Fix for #6719
gerritholl Nov 25, 2015
2c097dc
MAINT: Fix typo in swig.interface-file.rst
tosh1ki Nov 26, 2015
1ac5761
Merge pull request #6735 from charris/undo-relaxed-strides-default
charris Nov 26, 2015
3ef672e
BUG: Fixed string representation of mvoid with multi-dimensional columns
astrofrog Jul 19, 2015
af416f3
Merge pull request #6737 from tosh1ki/fix_typo
charris Nov 26, 2015
52e7594
Merge pull request #6736 from charris/backport-6721
charris Nov 26, 2015
1f40bb0
Merge pull request #6738 from charris/backport-6094
charris Nov 26, 2015
dcb491e
BUG: link cblas library if cblas is detected
ahaldane Dec 2, 2015
5734bba
Merge pull request #6770 from charris/backport-6757
charris Dec 4, 2015
6f7b32f
TST: test f2py, fallback on f2py2.7 etc., fixes #6718
joernhees Dec 2, 2015
aabfd81
Merge pull request #6772 from charris/backport-6756
charris Dec 5, 2015
f5cdf4a
BUG: Fix travis ci testing for new google infrastructure.
charris Dec 6, 2015
08885f9
Merge pull request #6783 from charris/fix-travis-for-1.10.x
charris Dec 6, 2015
bbb67c2
DEP: Deprecate changing shape of non-C-contiguous array via descr.
charris Nov 26, 2015
460327d
BUG: metadata is not copied to base_dtype
ahaldane Dec 6, 2015
760281a
Merge pull request #6779 from charris/backport-6747
charris Dec 6, 2015
db1c7c4
Merge pull request #6782 from charris/backport-6780
charris Dec 6, 2015
99ddcfd
BUG: Quick and dirty fix for interp.
charris Dec 7, 2015
3b9b28c
Merge pull request #6786 from charris/backport-6785
charris Dec 7, 2015
5aa1b9a
MAINT: Include from __future__ boilerplate in some files missing it.
charris Dec 6, 2015
e0d7934
Merge pull request #6787 from charris/backport-6775
charris Dec 7, 2015
2f21327
DOC: update the 1.10.2 release notes.
charris Nov 13, 2015
6ac59be
DOC: Update the 1.10.0 release notes.
charris Dec 6, 2015
ca42ee3
Merge pull request #6788 from charris/backport-6778
charris Dec 7, 2015
470647a
TST,BUG: Make test_mvoid_multidim_print work for 32 bit systems.
charris Dec 11, 2015
ccb8425
Merge pull request #6815 from charris/backport-6813
charris Dec 11, 2015
f02a62a
TST: Fix test_mvoid_multidim_print failures on Python 2.x for Windows
cgohlke Dec 11, 2015
ff81f3a
Merge pull request #6822 from charris/backport-6819
charris Dec 11, 2015
77fcac1
BUG: Disable 32-bit msvc9 compiler optimizations for npy_rint
cgohlke Dec 11, 2015
974dada
Merge pull request #6826 from charris/backport-6817
charris Dec 12, 2015
b899e36
DOC: Update 1.10.2 release notes with fixes for windows i386.
charris Dec 11, 2015
bbc5474
Merge pull request #6828 from charris/backport-6827
charris Dec 12, 2015
1376d43
TST: Update travis testing script.
charris Dec 16, 2015
c7ee0a1
Merge pull request #6840 from charris/1.10.x-travis-fixes
charris Dec 16, 2015
1b09110
BUG: Fix use of python 3 only FileNotFoundError in test_f2py.
charris Dec 16, 2015
075cc98
Merge pull request #6850 from charris/backport-6843
charris Dec 17, 2015
47ad210
REL: Update pavement.py and setup.py to reflect current version.
charris Dec 23, 2015
cd48c06
Merge pull request #6884 from charris/update-1.10.x-branch
njsmith Dec 23, 2015
adbd6db
BUG: #6922: Fix segfault introduced in 23901aa.
charris Jan 2, 2016
00d7499
TST: Add regression test for gh-6922.
charris Jan 2, 2016
114836b
Merge pull request #6925 from charris/backport-6924
charris Jan 3, 2016
406855b
BUG: Fix test_f2py so it runs correctly in runtests.py.
charris Jan 1, 2016
12430f0
Merge pull request #6926 from charris/backport-6916
charris Jan 3, 2016
dc708a0
DOC: Create Numpy 1.10.3 release notes.
charris Jan 5, 2016
a56554e
Merge pull request #6941 from charris/backport-6939
charris Jan 5, 2016
c99f4d4
DOC,BUG: Fix some latex generation problems.
charris Jan 5, 2016
347fc8e
Merge pull request #6944 from charris/backport-6943
charris Jan 5, 2016
99d28b9
TST: Add datetime test distinguishing modified following from preceding
mwiebe Jan 5, 2016
f5dc97e
BUG: Fix copy/paste error treating modifiedpreceding as modifiedfollo…
mwiebe Jan 5, 2016
6a911ee
Merge pull request #6945 from charris/backport-6942
charris Jan 6, 2016
ebf9f53
DOC: Update the 1.10.3 release notes for release.
charris Jan 5, 2016
2e54336
Merge pull request #6947 from charris/backport-6946
charris Jan 6, 2016
c8487ba
BUG trace is not subclass aware, such that np.trace(ma) != ma.trace().
mhvk Jan 6, 2016
477a130
BUG recarray slices should preserve subclass.
mhvk Jan 6, 2016
64a9c35
Merge pull request #6953 from charris/backport-6950
charris Jan 6, 2016
076547f
DOC: Update 1.10.3 release notes with last minute additions.
charris Jan 6, 2016
31c750f
Merge pull request #6957 from charris/backport-6954
charris Jan 6, 2016
7681d0f
Merge pull request #6956 from charris/backport-6952
charris Jan 6, 2016
ab7dc71
DOC: update 1.10.3 release notes.
charris Jan 6, 2016
6f07d45
Merge pull request #6959 from charris/backport-6958
charris Jan 6, 2016
4f01ced
DOC: Prepare for 1.10.4 release.
charris Jan 7, 2016
2e3e10e
Merge pull request #6961 from charris/prepare-1.10.4-release
charris Jan 7, 2016
ffa7ac6
DOC: Fix typo.
jakirkham Jan 16, 2016
10eba46
Merge pull request #7039 from jakirkham/1_10_4_rel_doc_fix_backport
charris Jan 16, 2016
27bf312
MAINT: Constrain `pip` and `setuptools` to versions that still suppor…
jakirkham Jan 20, 2016
81d6a98
Merge pull request #7070 from jakirkham/pin_pip
charris Jan 20, 2016
8c15e09
Corrected docs for array padding
chiffa Feb 27, 2016
519ec10
Changed the example as described in issue #7353
chiffa Feb 27, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions numpy/core/src/umath/loops.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -1287,11 +1287,17 @@ TIMEDELTA_md_m_multiply(char **args, npy_intp *dimensions, npy_intp *steps, void
BINARY_LOOP {
const npy_timedelta in1 = *(npy_timedelta *)ip1;
const double in2 = *(double *)ip2;
if (in1 == NPY_DATETIME_NAT || npy_isnan(in2)) {
if (in1 == NPY_DATETIME_NAT) {
*((npy_timedelta *)op1) = NPY_DATETIME_NAT;
}
else {
*((npy_timedelta *)op1) = (npy_timedelta)(in1 * in2);
double result = in1 * in2;
if (npy_isfinite(result)) {
*((npy_timedelta *)op1) = (npy_timedelta)result;
}
else {
*((npy_timedelta *)op1) = NPY_DATETIME_NAT;
}
}
}
}
Expand All @@ -1302,11 +1308,17 @@ TIMEDELTA_dm_m_multiply(char **args, npy_intp *dimensions, npy_intp *steps, void
BINARY_LOOP {
const double in1 = *(double *)ip1;
const npy_timedelta in2 = *(npy_timedelta *)ip2;
if (npy_isnan(in1) || in2 == NPY_DATETIME_NAT) {
if (in2 == NPY_DATETIME_NAT) {
*((npy_timedelta *)op1) = NPY_DATETIME_NAT;
}
else {
*((npy_timedelta *)op1) = (npy_timedelta)(in1 * in2);
double result = in1 * in2;
if (npy_isfinite(result)) {
*((npy_timedelta *)op1) = (npy_timedelta)result;
}
else {
*((npy_timedelta *)op1) = NPY_DATETIME_NAT;
}
}
}
}
Expand Down Expand Up @@ -1338,11 +1350,11 @@ TIMEDELTA_md_m_divide(char **args, npy_intp *dimensions, npy_intp *steps, void *
}
else {
double result = in1 / in2;
if (npy_isnan(result)) {
*((npy_timedelta *)op1) = NPY_DATETIME_NAT;
if (npy_isfinite(result)) {
*((npy_timedelta *)op1) = (npy_timedelta)result;
}
else {
*((npy_timedelta *)op1) = (npy_timedelta)(result);
*((npy_timedelta *)op1) = NPY_DATETIME_NAT;
}
}
}
Expand Down
34 changes: 34 additions & 0 deletions numpy/core/tests/test_datetime.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import division, absolute_import, print_function

import pickle
import warnings

import numpy
import numpy as np
Expand Down Expand Up @@ -961,6 +962,21 @@ def test_datetime_multiply(self):
# float * M8
assert_raises(TypeError, np.multiply, 1.5, dta)

# NaTs
with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=RuntimeWarning)
nat = np.timedelta64('NaT')
def check(a, b, res):
assert_equal(a * b, res)
assert_equal(b * a, res)
for tp in (int, float):
check(nat, tp(2), nat)
check(nat, tp(0), nat)
for f in (float('inf'), float('nan')):
check(np.timedelta64(1), f, nat)
check(np.timedelta64(0), f, nat)
check(nat, f, nat)

def test_datetime_divide(self):
for dta, tda, tdb, tdc, tdd in \
[
Expand Down Expand Up @@ -1010,6 +1026,24 @@ def test_datetime_divide(self):
# float / M8
assert_raises(TypeError, np.divide, 1.5, dta)

# NaTs
with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=RuntimeWarning)
nat = np.timedelta64('NaT')
for tp in (int, float):
assert_equal(np.timedelta64(1) / tp(0), nat)
assert_equal(np.timedelta64(0) / tp(0), nat)
assert_equal(nat / tp(0), nat)
assert_equal(nat / tp(2), nat)
# Division by inf
assert_equal(np.timedelta64(1) / float('inf'), np.timedelta64(0))
assert_equal(np.timedelta64(0) / float('inf'), np.timedelta64(0))
assert_equal(nat / float('inf'), nat)
# Division by nan
assert_equal(np.timedelta64(1) / float('nan'), nat)
assert_equal(np.timedelta64(0) / float('nan'), nat)
assert_equal(nat / float('nan'), nat)

def test_datetime_compare(self):
# Test all the comparison operators
a = np.datetime64('2000-03-12T18:00:00.000000-0600')
Expand Down
0