1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
import numpy as np
import laspy
def test_bench_sub_field_view_comparison(benchmark):
las = laspy.create()
las.x = np.zeros(10**6, np.float64)
benchmark(lambda: las.classification == 4)
def test_bench_scaled_array_comparison(benchmark):
las = laspy.create()
las.x = np.zeros(10**6, np.float64)
benchmark(lambda: las.x >= 140.7329047)
def test_bench_normal_field_comparison(benchmark):
las = laspy.create()
las.x = np.zeros(10**6, np.float64)
benchmark(lambda: las.X >= 779012)
|