[Numpy-svn] [numpy/numpy] 6a61be: ENH: Add dtype argument to random.randint.
GitHub
noreply at github.com
Sun Jan 3 17:29:34 EST 2016
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: 6a61be6b67a747d3228ffc8882a03c86a378ea10
https://github.com/numpy/numpy/commit/6a61be6b67a747d3228ffc8882a03c86a378ea10
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-02 (Sat, 02 Jan 2016)
Changed paths:
M numpy/core/include/numpy/npy_common.h
A numpy/random/mtrand/mt_compat.h
M numpy/random/mtrand/mtrand.pyx
M numpy/random/mtrand/numpy.pxd
M numpy/random/mtrand/randomkit.c
M numpy/random/mtrand/randomkit.h
Log Message:
-----------
ENH: Add dtype argument to random.randint.
Random ndarrays of the following types can now be generated:
* np.bool,
* np.int8, np.uint8,
* np.int16, np.uint16,
* np.int32, np.uint32,
* np.int64, np.uint64,
* np.int_ (long), np.intp
The specification is by precision rather than by C type. Hence, on some
platforms np.int64 may be a `long` instead of `long long` even if the
specified dtype is `long long` because the two may have the same
precision. The resulting type depends on which c type numpy uses for the
given precision. The byteorder specification is also ignored, the
generated arrays are always in native byte order.
The dtype of the result could be made more explicit if desired without
changing the user visible results.
Commit: 5aca879e18541eff3daf506786b07a950a075b37
https://github.com/numpy/numpy/commit/5aca879e18541eff3daf506786b07a950a075b37
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-02 (Sat, 02 Jan 2016)
Changed paths:
M numpy/random/tests/test_random.py
Log Message:
-----------
TST: Add tests for new randint functionality.
* check exceptions
* check extreme bounds are reachable
* check that all values are in the specified bounds
* check repeatability of sequences
More exact statistical tests would be nice, but that is another
project.
Commit: 51726e59137aa0ea6cf216d95f23fe788a7164ea
https://github.com/numpy/numpy/commit/51726e59137aa0ea6cf216d95f23fe788a7164ea
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-02 (Sat, 02 Jan 2016)
Changed paths:
M numpy/core/tests/test_mem_overlap.py
Log Message:
-----------
TST,BUG: Fix use of randint in test_mem_overlap.py.
The default randint function returns a C long type which does not have
enough range to test indexes on Windows 64. The fix here is to use
specify a np.intp dtype for the randint call now that we have that
option.
Closes #6812.
Commit: 5132ce0ad0ff4e7c448c80eeaa806678d558f81c
https://github.com/numpy/numpy/commit/5132ce0ad0ff4e7c448c80eeaa806678d558f81c
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-02 (Sat, 02 Jan 2016)
Changed paths:
M numpy/core/src/multiarray/multiarray_tests.c.src
Log Message:
-----------
BUG: Get rid of C++ style comment in multiarray_tests.c.src
Commit: 6a04b9217675a1a072b01ade0f2664b30f67bde6
https://github.com/numpy/numpy/commit/6a04b9217675a1a072b01ade0f2664b30f67bde6
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-02 (Sat, 02 Jan 2016)
Changed paths:
M tools/travis-test.sh
Log Message:
-----------
TST: Increase the allowable warning count to 1 for i386 debug test.
Cython generated C code contains the number '-2147483648L', which
leads to a warning on 32 bit platforms:
"Warning: this decimal constant is unsigned only in ISO C90"
See the discussion at http://stackoverflow.com/questions/9941261/
The compiled code seems to run correctly despite the warning and
if there are problems, they should turn up in the nose testing.
Commit: 07fa8cc957880614319aeb5b88c88ae367d954d9
https://github.com/numpy/numpy/commit/07fa8cc957880614319aeb5b88c88ae367d954d9
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-02 (Sat, 02 Jan 2016)
Changed paths:
M appveyor.yml
Log Message:
-----------
TST: Enable AppVeyor failure to be reported.
AppVeyor failures were filtered out until numpy issues were fixed.
The last issues were the test_mem_overlap failures on 64 bit windows,
and those are fixed.
Commit: bc2a97bde26a026e75adec7ec70566be3005c47c
https://github.com/numpy/numpy/commit/bc2a97bde26a026e75adec7ec70566be3005c47c
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-02 (Sat, 02 Jan 2016)
Changed paths:
M doc/release/1.11.0-notes.rst
Log Message:
-----------
DOC: Document new randint dtype parameter in 1.11.0 release notes.
Commit: 9fb9288f461c7c7af9708f136fa4f29acdc734a8
https://github.com/numpy/numpy/commit/9fb9288f461c7c7af9708f136fa4f29acdc734a8
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-01-03 (Sun, 03 Jan 2016)
Changed paths:
M appveyor.yml
M doc/release/1.11.0-notes.rst
M numpy/core/include/numpy/npy_common.h
M numpy/core/src/multiarray/multiarray_tests.c.src
M numpy/core/tests/test_mem_overlap.py
A numpy/random/mtrand/mt_compat.h
M numpy/random/mtrand/mtrand.pyx
M numpy/random/mtrand/numpy.pxd
M numpy/random/mtrand/randomkit.c
M numpy/random/mtrand/randomkit.h
M numpy/random/tests/test_random.py
M tools/travis-test.sh
Log Message:
-----------
Merge pull request #6910 from charris/add-64-bit-random-int
ENH: Add dtype argument to random.randint.
Compare: https://github.com/numpy/numpy/compare/5dab9275475e...9fb9288f461c
More information about the Numpy-svn
mailing list