AI4S2S / s2spy

A high-level python package integrating expert knowledge and artificial intelligence to boost (sub) seasonal forecasting
https://ai4s2s.readthedocs.io/
Apache License 2.0
20 stars 7 forks source link

Adding the `n` kwarg to the calendar's `add_intervals` method #150

Closed BSchilperoort closed 1 year ago

BSchilperoort commented 1 year ago

This PR adds the n kwarg to the add_interval method, allowing users to add multiple intervals at once, without a for loop. For example:

cal = Calendar(anchor="Jan")
cal.add_intervals("precursor", "1W", n=10)

Instead of the old way:

cal = Calendar(anchor="Jan")
for _ in range(10):
    cal.add_intervals("precursor", "1W")

Closes #147

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication