File: test_mmap.py

package info (click to toggle)
python-laspy 2.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,928 kB
  • sloc: python: 9,065; makefile: 20
file content (12 lines) | stat: -rw-r--r-- 284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import numpy as np

import laspy


def test_mmap(mmapped_file_path):
    with laspy.mmap(mmapped_file_path) as las:
        las.classification[:] = 25
        assert np.all(las.classification == 25)

    las = laspy.read(mmapped_file_path)
    assert np.all(las.classification == 25)