Commit ff78ab32 authored by Lars Buitinck's avatar Lars Buitinck

comment some fields in buffer protocol docs

[ci skip]
parent d86fba4a
...@@ -73,16 +73,16 @@ which Cython handles specially. ...@@ -73,16 +73,16 @@ which Cython handles specially.
self.strides[0] = self.ncols * self.strides[1] self.strides[0] = self.ncols * self.strides[1]
buffer.buf = <char *>&(self.v[0]) buffer.buf = <char *>&(self.v[0])
buffer.format = 'f' buffer.format = 'f' # float
buffer.internal = NULL buffer.internal = NULL # see References
buffer.itemsize = itemsize buffer.itemsize = itemsize
buffer.len = self.v.size() * itemsize buffer.len = self.v.size() * itemsize # product(shape) * itemsize
buffer.ndim = 2 buffer.ndim = 2
buffer.obj = self buffer.obj = self
buffer.readonly = 0 buffer.readonly = 0
buffer.shape = self.shape buffer.shape = self.shape
buffer.strides = self.strides buffer.strides = self.strides
buffer.suboffsets = NULL buffer.suboffsets = NULL # for pointer arrays only
def __releasebuffer__(self, Py_buffer *buffer): def __releasebuffer__(self, Py_buffer *buffer):
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment