Closed skovorodkin closed 6 years ago
Currently byte_bounds(Z1)[0] points to the beginning of the 1 element:
byte_bounds(Z1)[0]
1
byte_bounds(Z1)[0] byte_bounds(Z1)[-1] ↓ ↓ ╌╌╌┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬╌╌ Z1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ ╌╌╌┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴╌╌
[But] byte_bounds's docstring says, that "the first integer is the first byte of the array" and:
byte_bounds
>>> I = np.eye(2, dtype='f'); I.dtype dtype('float32') >>> low, high = np.byte_bounds(I) >>> high - low == I.size*I.itemsize True
So it looks like the pointer on the diagram should point before the 0-th element not after:
You're right, thanks. Could make a PR ?
Currently
byte_bounds(Z1)[0]
points to the beginning of the1
element:[But]
byte_bounds
's docstring says, that "the first integer is the first byte of the array" and:So it looks like the pointer on the diagram should point before the 0-th element not after: