Browse Source

python/corrade: remove TODOs that are impossible.

pull/2/head
Vladimír Vondruš 7 years ago
parent
commit
f9a2146142
  1. 2
      src/python/corrade/containers.cpp
  2. 1
      src/python/corrade/test/test_containers.py

2
src/python/corrade/containers.cpp

@ -309,8 +309,6 @@ template<unsigned dimensions, class T> void stridedArrayView(py::class_<PyStride
py::reinterpret_borrow<py::object>(buffer.obj)};
}), "Construct from a buffer")
// TODO: construct from a buffer + size/stride
/* Length, size/stride tuple, dimension count and memory owning object */
.def("__len__", [](const PyStridedArrayView<dimensions, T>& self) {
return Containers::StridedDimensions<dimensions, std::size_t>(self.size())[0];

1
src/python/corrade/test/test_containers.py

@ -404,7 +404,6 @@ class StridedArrayView2D(unittest.TestCase):
a_refcount = sys.getrefcount(a)
v = memoryview(a).cast('b', shape=[3, 8])
# TODO: construct as containers.StridedArrayView2D(a, (3, 8), (8, 1))
b = containers.StridedArrayView2D(v)
self.assertEqual(len(b), 3)
self.assertEqual(bytes(b), b'01234567'

Loading…
Cancel
Save