Skip to content

Commit

Permalink
Fix PyTorch-NumPy compatibility in build workflows (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liraim authored Oct 28, 2024
1 parent 421630f commit 455b8f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
if: github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-13]
os: [ubuntu-22.04, windows-2022, macos-14]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os: windows-latest
Expand All @@ -139,7 +139,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: "x64"
cache: "pip"
cache-dependency-path: setup.py
- uses: actions/cache@v4
Expand Down
7 changes: 7 additions & 0 deletions tests/test_torch_numpy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import numpy as np
import torch


def test_torch_to_numpy():
array = torch.tensor([1, 2, 3]).numpy()
assert np.array_equal(array, np.array([1, 2, 3]))

0 comments on commit 455b8f0

Please sign in to comment.