def test_fail_with_math(): pysolar.use_math() lat = np.array([45., 40.]) lon = np.array([3., 4.]) time = datetime(2018, 5, 8, 12, 0, 0, tzinfo=pytz.UTC) solar.get_altitude(lat, lon, time)
def test_scalar_with_math(): pysolar.use_math() lat = 45. lon = 3. time = datetime(2018, 5, 8, 12, 0, 0, tzinfo=pytz.UTC) print(solar.get_altitude(lat, lon, time)) print(solar.get_azimuth(lat, lon, time))