Traceback (most recent call last): File "D:\python_work\ld_open3d\src\test4.py", line 53, in <module> las_out.write("../test4/small_file_{}.las".format(i)) File "D:\python64\lib\site-packages\laspy\lasdata.py", line 273, in write self._write_to(out, do_compress=do_compress, laz_backend=laz_backend) File "D:\python64\lib\site-packages\laspy\lasdata.py", line 292, in _write_to writer.write_points(self.points) File "D:\python64\lib\site-packages\laspy\laswriter.py", line 141, in write_points self.point_writer.write_points(points) File "D:\python64\lib\site-packages\laspy\laswriter.py", line 273, in write_points self.dest.write(points.memoryview()) BufferError: memoryview: underlying buffer is not C-contiguous
时间: 2023-06-08 16:07:40 浏览: 145
python-unit-test-tool-comparison:比较Python unittest,nose和py.test
这个错误是由于内存缓冲区不是连续的,导致无法写入。这可能是由于使用了非连续性数据类型,或者缓冲区被修改导致的。解决方法可能是使用连续性数据类型,或者重新构造缓冲区。另外也可以尝试使用Python中的numpy数组来代替缓冲区。
阅读全文