File: test_mmap.py

package info (click to toggle)
python-laspy 2.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,128 kB
  • sloc: python: 9,459; makefile: 20
file content (12 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (2)
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)