BUG: Return rank 0 for empty matrices in matrix_rank #611
Workflow file for this run
This file contains hidden or 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: stubtest | |
| permissions: read-all | |
| # Stubtest depends on different branches and paths than mypy does, so we have a separate workflow. | |
| on: | |
| pull_request: | |
| branches: | |
| - "main" | |
| - "maintenance/2.**" | |
| # Stubtest requires numpy>=2.4 | |
| - "!maintenance/2.[0-3].x" | |
| paths: | |
| - ".github/workflows/stubtest.yml" | |
| - "numpy/**" | |
| - "!numpy/**/tests/**" | |
| - "requirements/test_requirements.txt" | |
| - "tools/stubtest/**" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| mypy: | |
| # To enable this workflow on a fork, comment out: | |
| if: github.repository == 'numpy/numpy' | |
| name: stubtest | |
| runs-on: ${{ matrix.os }}-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # TODO: consider including macos and windows | |
| os: [ubuntu] | |
| py: ["3.12", "3.14"] | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: recursive | |
| fetch-tags: true | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a # v7.1.5 | |
| with: | |
| python-version: ${{ matrix.py }} | |
| activate-environment: true | |
| cache-dependency-glob: | | |
| requirements/build_requirements.txt | |
| requirements/test_requirements.txt | |
| - name: uv pip install | |
| run: >- | |
| uv pip install | |
| -r requirements/build_requirements.txt | |
| -r requirements/test_requirements.txt | |
| - name: spin build | |
| run: spin build -j2 -- -Dallow-noblas=true -Ddisable-optimization=true --vsenv | |
| - name: spin stubtest | |
| run: spin stubtest |