summaryrefslogtreecommitdiff
path: root/docs/examples/userguide/buffer/matrix.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/userguide/buffer/matrix.pyx')
-rw-r--r--docs/examples/userguide/buffer/matrix.pyx31
1 files changed, 15 insertions, 16 deletions
diff --git a/docs/examples/userguide/buffer/matrix.pyx b/docs/examples/userguide/buffer/matrix.pyx
index abdb2d3c7..f2547f6c3 100644
--- a/docs/examples/userguide/buffer/matrix.pyx
+++ b/docs/examples/userguide/buffer/matrix.pyx
@@ -1,16 +1,15 @@
-# distutils: language = c++
-
-# matrix.pyx
-
-from libcpp.vector cimport vector
-
-cdef class Matrix:
- cdef unsigned ncols
- cdef vector[float] v
-
- def __cinit__(self, unsigned ncols):
- self.ncols = ncols
-
- def add_row(self):
- """Adds a row, initially zero-filled."""
- self.v.resize(self.v.size() + self.ncols)
+# distutils: language = c++
+
+from libcpp.vector cimport vector
+
+
+cdef class Matrix:
+ cdef unsigned ncols
+ cdef vector[float] v
+
+ def __cinit__(self, unsigned ncols):
+ self.ncols = ncols
+
+ def add_row(self):
+ """Adds a row, initially zero-filled."""
+ self.v.resize(self.v.size() + self.ncols)