Skip to content

Commit

Permalink
Merge pull request #153 from pllim/np2-py312
Browse files Browse the repository at this point in the history
TST: numpy 2, python 3.12
  • Loading branch information
pllim committed Sep 22, 2023
2 parents addf0a5 + 76adeaa commit f49c3cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
- name: Install and build
run: |
python -m pip install --upgrade pip wheel setuptools
Expand All @@ -86,10 +86,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12-dev'
- name: Install and build
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy>=0.0.dev0 --pre --upgrade
python -m pip install --extra-index-url https://pypi.anaconda.org/astropy/simple astropy>=0.0.dev0 --pre --upgrade
python -m pip install -e .[test]
- name: Test with dev deps
Expand Down
3 changes: 1 addition & 2 deletions lib/stsci/tools/bitmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@
# 1.1.2 (11-August-2021) - Improved compatibility with numpy 1.21.*.
#
INT_TYPE = (int, )
MAX_UINT_TYPE = np.maximum_sctype(np.uint)
SUPPORTED_FLAGS = int(np.bitwise_not(
0, dtype=MAX_UINT_TYPE, casting='unsafe'
0, dtype="uint64", casting='unsafe'
))


Expand Down
4 changes: 2 additions & 2 deletions lib/stsci/tools/tests/test_bitmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from stsci.tools import bitmask

MAX_INT_TYPE = np.maximum_sctype(int)
MAX_UINT_TYPE = np.maximum_sctype(np.uint)
MAX_INT_TYPE = np.int64
MAX_UINT_TYPE = np.uint64
MAX_UINT_FLAG = np.left_shift(
MAX_UINT_TYPE(1),
MAX_UINT_TYPE(np.iinfo(MAX_UINT_TYPE).bits - 1)
Expand Down

0 comments on commit f49c3cd

Please sign in to comment.