This rule raises an issue when a numpy weekmask format is incorrect.
To allow a datetime to be used in contexts where only certain days of the week are valid, NumPy includes a set of business day functions.
Weekmask is used to customize valid business days.
Weekmask can be specified in several formats:
1 or 0 values, e.g. [1, 1, 1, 1, 1, 0, 0] 1 or 0 characters, e.g. "1111100" Mon Tue Wed Thu Fri Sat Sun, e.g. "Mon Tue Wed Thu Fri"
Setting an incorrect weekmask leads to ValueError.
Provide a weekmask with correct values.
import numpy as np
offset = np.busday_offset('2012-05', 1, roll='forward', weekmask='01') # Noncompliant: ValueError
import numpy as np
offset = np.busday_offset('2012-05', 1, roll='forward', weekmask='0111100') # OK