diff options
author | John Stowers <john.stowers@gmail.com> | 2016-02-04 15:35:33 +0100 |
---|---|---|
committer | John Stowers <john.stowers@gmail.com> | 2016-02-04 15:35:33 +0100 |
commit | 97f5f1737dcd4a612e6a6905750601952209b633 (patch) | |
tree | ea1cf6fcba186c8756f868e1645ff13801db0773 /pcl | |
parent | a03b8d88653740f10ce84f609d85d5e2dfa2baa6 (diff) | |
parent | 0501b09b557c5a76183d53b3981fe83022cfd6b3 (diff) |
Merge pull request #81 from larsmans/fixes
Fix bug in buffer protocol support
Diffstat (limited to 'pcl')
-rw-r--r-- | pcl/_pcl.pyx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcl/_pcl.pyx b/pcl/_pcl.pyx index 0493ea8..d65fa59 100644 --- a/pcl/_pcl.pyx +++ b/pcl/_pcl.pyx @@ -138,7 +138,7 @@ cdef class SegmentationNormal: return min_angle, max_angle -# Empirically determine strides, for buffer support. +# Empirically determine strides, for buffer protocol support. # XXX Is there a more elegant way to get these? cdef Py_ssize_t _strides[2] cdef PointCloud _pc_tmp = PointCloud(np.array([[1, 2, 3], @@ -205,9 +205,9 @@ cdef class PointCloud: cdef Py_ssize_t npoints = self.thisptr().size() if self._view_count == 0: - self._view_count += 1 self._shape[0] = npoints self._shape[1] = 3 + self._view_count += 1 buffer.buf = <char *>&(cpp.getptr_at(self.thisptr(), 0).x) buffer.format = 'f' |