diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-12-30 10:19:31 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-01-02 12:30:01 -0700 |
commit | 6a61be6b67a747d3228ffc8882a03c86a378ea10 (patch) | |
tree | 90ba9e2471ebf1752a295140120ac668e73ebd57 /numpy/lib/user_array.py | |
parent | 004639d07fd161d1394f5dda1b6ed42c777f3c80 (diff) | |
download | numpy-6a61be6b67a747d3228ffc8882a03c86a378ea10.tar.gz |
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.
Diffstat (limited to 'numpy/lib/user_array.py')
0 files changed, 0 insertions, 0 deletions