Skip to content

BUG: weekmask parameter in busdaycalendar is not accepting array of booleans . #30883

Description

@OliveiraPedro02

Describe the issue:

the busdaycalendar is not working properly when an array of boolean is given to weekmask. I'm using the example from the numpy page.

Reproduce the code example:

import numpy as np

np.busdaycalendar(
    holidays=['2011-07-01', '2011-07-04', '2011-07-17'], weekmask=np.array([ True,  True, True,  True,  True, False, False]))

Error message:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: 'numpy.bool' object cannot be interpreted as an intege

Python and NumPy Versions:

python 3.14
numpy 2.4.2

Runtime Environment:

No response

How does this issue affect you or how did you find it:

I'm developing a library to handle day-count conventions and generate cash flows. This is affecting my joint calendars implementation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions