diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-03-24 22:25:21 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-03-24 22:25:21 +0000 |
commit | 7b751f66c7feb71646f0c2540aca2e5e67cd5db5 (patch) | |
tree | 3c33eab7a5933af7300ee4949c541511ebb7f915 /numpy/lib/utils.py | |
parent | 940a7d3b4e6398a742873347a2f3c605ceffe481 (diff) | |
download | numpy-7b751f66c7feb71646f0c2540aca2e5e67cd5db5.tar.gz |
Merge from the doc wiki
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 9717a7a8f..3de0579df 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -149,15 +149,21 @@ get_numpy_include = deprecate(get_include, 'get_numpy_include', 'get_include') #-------------------------------------------- def byte_bounds(a): - """(low, high) are pointers to the end-points of an array + """ + Returns pointers to the end-points of an array. - low is the first byte - high is just *past* the last byte + Parameters + ---------- + a : ndarray + Input array. It must conform to the Python-side of the array interface. - If the array is not single-segment, then it may not actually - use every byte between these bounds. + Returns + ------- + (low, high) : tuple of 2 integers + The first integer is the first byte of the array, the second integer is + just past the last byte of the array. If `a` is not contiguous it + would not use every byte between the (`low`, `high`) values. - The array provided must conform to the Python-side of the array interface """ ai = a.__array_interface__ a_data = ai['data'][0] @@ -228,10 +234,8 @@ def who(vardict=None): >>> np.whos(d) Name Shape Bytes Type =========================================================== - <BLANKLINE> y 3 24 float64 x 2 16 float64 - <BLANKLINE> Upper bound on total bytes = 40 """ |