Skip to content

Commit

Permalink
fix division by zero when generating less than 100 records
Browse files Browse the repository at this point in the history
  • Loading branch information
fizmat committed Mar 24, 2024
1 parent 0d5b2ea commit fd4250e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion createMeasurements.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def generateMeasurementFile(
f"Creating measurement file '{file_name}' with {records:,} measurements..."
)
start = time.time()
progress_report_unit = records // 100
progress_report_unit = max(records // 100, 1)
with open(file_name, "w") as f:
for i in range(records):
station, measurement = self.generateSingleMeasurement(std_dev=std_dev)
Expand Down

0 comments on commit fd4250e

Please sign in to comment.