chaosmagpy.data_utils.is_leap_year

chaosmagpy.data_utils.is_leap_year(year)[source]

Determine if input year is a leap year.

Parameters
yearint, ndarray, shape (…)

Years to test for leap year.

Returns
leap_yearndarray of bools, shape (…)

True for leap year in array.

Raises
TypeError if year is not of type integer.

Examples

>>> is_leap_year([2000, 2001, 2004])
    array([ True, False,  True])