ENH: Add bincount, like np.bincount but accepts an axis parameter. #464
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: [push, pull_request] | |
jobs: | |
ubuntu-latest: | |
strategy: | |
matrix: | |
python-version: ['3.12', '3.11', '3.10', '3.9'] | |
numpy-version: ['1.23.5', '1.24.4', '1.25.2', '1.26.4', '2.0.2', '2.1.1'] | |
exclude: | |
- python-version: '3.9' | |
numpy-version: '2.1.1' | |
- python-version: '3.12' | |
numpy-version: '1.23.5' | |
- python-version: '3.12' | |
numpy-version: '1.24.4' | |
- python-version: '3.12' | |
numpy-version: '1.25.2' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install --upgrade setuptools | |
python -m pip install ninja meson-python toml pytest | |
python -m pip install numpy==${{ matrix.numpy-version }} | |
- name: Install ufunclab | |
run: | | |
python -m pip install --no-build-isolation . | |
- name: Test with pytest | |
run: | | |
pytest --pyargs ufunclab | |
macos: | |
strategy: | |
matrix: | |
python-version: ['3.12', '3.11', '3.10', '3.9'] | |
numpy-version: ['1.23.5', '1.24.4', '1.25.2', '1.26.4', '2.0.2', '2.1.1'] | |
exclude: | |
- python-version: '3.9' | |
numpy-version: '2.1.1' | |
- python-version: '3.12' | |
numpy-version: '1.23.5' | |
- python-version: '3.12' | |
numpy-version: '1.24.4' | |
- python-version: '3.12' | |
numpy-version: '1.25.2' | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install --upgrade setuptools | |
python -m pip install ninja meson-python toml pytest | |
python -m pip install numpy==${{ matrix.numpy-version }} | |
- name: Install ufunclab | |
run: | | |
python -m pip install --no-build-isolation . | |
- name: Test with pytest | |
run: | | |
pytest --pyargs ufunclab | |
# main-numpy: | |
# strategy: | |
# matrix: | |
# python-version: ['3.10', '3.11', '3.12'] | |
# os: [ubuntu-latest] | |
# | |
# runs-on: ${{ matrix.os }} | |
# | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
# - name: Install dependencies | |
# run: | | |
# sudo apt-get install libopenblas-dev | |
# python -m pip install --upgrade pip wheel | |
# python -m pip install --upgrade setuptools==59.2.0 | |
# python -m pip install ninja meson-python toml pytest | |
# pushd . | |
# cd .. | |
# git clone --shallow-submodules --recurse-submodules https://github.com/numpy/numpy.git | |
# cd numpy | |
# python -m pip install . | |
# popd | |
# - name: Install ufunclab | |
# run: | | |
# python -m pip install --no-build-isolation . | |
# - name: Test with pytest | |
# run: | | |
# pytest --pyargs ufunclab | |
windows-msvc: | |
strategy: | |
matrix: | |
numpy-version: ['1.25.2', '1.26.4', '2.0.2', '2.1.1'] | |
os: ['windows-2019', 'windows-latest'] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up msvc-dev-cmd | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
cache: 'pip' | |
cache-dependency-path: 'environment.yml' | |
- name: Install Python dependencies | |
run: | | |
pip install numpy==${{ matrix.numpy-version }} meson ninja meson-python pytest toml | |
- name: Build | |
run: | | |
# Running meson and ninja before pip is only here for debugging | |
# visibility. Eventually those commands will be removed--all we | |
# need is pip. | |
meson setup build | |
ninja -v -j 1 -C build | |
pip -v install --no-build-isolation . | |
- name: Test | |
run: | | |
pytest --pyargs ufunclab |