update¶
- erfa.leap_seconds.update(table)[source]¶
Add any leap seconds not already present to the ERFA table.
This function matches leap seconds with those present in the ERFA table, and extends the latter as necessary.
If the ERFA leap seconds file was corrupted, it will be reset.
If the table is corrupted, the ERFA file will be unchanged.
- Parameters:
- tablearray_like or
LeapSeconds Array or table with TAI-UTC from leap seconds. Should have ‘year’, ‘month’, and ‘tai_utc’ columns.
- tablearray_like or
- Returns:
- n_updateint
Number of items updated.
- Raises:
- ValueError
If the leap seconds in the table are not on the 1st of January or July, or if the sorted TAI-UTC do not increase in increments of 1.