def test2(self, inFile):
        print("Test 2: Checking that header bounding box is precise.")
        actual_max = [np.max(vec) for vec in [inFile.x, inFile.y, inFile.z]]
        actual_min = [np.min(vec) for vec in [inFile.x, inFile.y, inFile.z]]
        header_max = inFile.header.max 
        header_min = inFile.header.min
        max_diffs = [actual_max[i] - header_max[i] for i in range(3)]
        min_diffs = [actual_min[i] - header_min[i] for i in range(3)]
        err = 0
        for i in range(len(max_diffs)):
            if max_diffs[i] > self.args.tol:
                err += 1
                print("... " + ["X", "Y", "Z"][i] + " header max doesn't match actual max.")
                print("...    actual max: " + str(actual_max[i]) + ", header max: " + str(header_max[i]))
                logging.info(["X", "Y", "Z"][i] + " header max doesn't match actual max at tolerance %s." %str(self.args.tol))
        for i in range(len(min_diffs)):
            if min_diffs[i] > self.args.tol:
                err += 1
                print("... " + ["X", "Y", "Z"][i] + " header min doesn't match actual min.")
                print("...    actual min: " + str(actual_max[i]) + ", header min: " + str(header_max[i]))
                logging.info(["X", "Y", "Z"][i] + " header min doesn't match actual min at tolerance %s." %str(self.args.tol))
        if err == 0:
            print("... passed")
        else:
            self.errors += 1
            print("... failed")
        self.tests += 1
dataset/ETHPy150Open grantbrown/laspy/laspy/tools/lasvalidate.py/validate.test2/original