Skip to content

Commit

Permalink
py: Install with numpy >= 2.0 (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikcs authored Nov 3, 2024
1 parent e23af47 commit 5b79614
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
workingDirectory: 'python-package'
displayName: 'Test Python bindings'
- script: |
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install libomp
pip install -I causalml xgboost matplotlib jupyter
jupyter nbconvert --execute --to 'notebook' introduction.ipynb
workingDirectory: 'python-package/notebooks'
Expand Down
2 changes: 1 addition & 1 deletion python-package/maq/maq.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class MAQ:
Get an estimate of gain at a given spend along with standard errors.
>>> mq.average_gain(spend=0.1)
(0.005729002695991717, 0.019814651108894354)
(np.float64(0.005729002695991717), np.float64(0.019814651108894354))
Get the underlying treatment allocation matrix at a given spend, a n x K array.
Expand Down
4 changes: 2 additions & 2 deletions python-package/maq/maqbindings.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ cpdef solver_cpp(np.ndarray[double, ndim=2, mode="c"] reward,
spend = np.empty(path_len, dtype="double")
gain = np.empty(path_len, dtype="double")
std_err = np.empty(path_len, dtype="double")
ipath = np.empty(path_len, dtype="int")
kpath = np.empty(path_len, dtype="int")
ipath = np.empty(path_len, dtype="long")
kpath = np.empty(path_len, dtype="long")
if paired_inference:
gain_bs = np.empty((n_bootstrap, path_len), dtype="double")
else:
Expand Down
2 changes: 1 addition & 1 deletion python-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ requires = [
"setuptools",
"wheel",
"cython",
"oldest-supported-numpy"
"numpy >= 2.0"
]

0 comments on commit 5b79614

Please sign in to comment.