Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions pytests/test_torchoperator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import platform

if int(os.environ.get("TEST_CUPY_PYLOPS", 0)):
import cupy as np
Expand All @@ -11,7 +10,6 @@
from numpy.testing import assert_array_equal

backend = "numpy"
import numpy as npp
import pytest
import torch

Expand All @@ -30,10 +28,6 @@ def test_TorchOperator(par):
must equal the adjoint of operator applied to the same vector, the two
results are also checked to be the same.
"""
# temporarily, skip tests on mac as torch seems not to recognized
# numpy when v2 is installed
if platform.system() == "Darwin":
return
device = "cpu" if backend == "numpy" else "cuda"

Dop = MatrixMult(np.random.normal(0.0, 1.0, (par["ny"], par["nx"])))
Expand All @@ -60,10 +54,6 @@ def test_TorchOperator(par):
@pytest.mark.parametrize("par", [(par1)])
def test_TorchOperator_batch(par):
"""Apply forward for input with multiple samples (= batch) and flattened arrays"""
# temporarily, skip tests on mac as torch seems not to recognized
# numpy when v2 is installed
if platform.system() == "Darwin":
return
device = "cpu" if backend == "numpy" else "cuda"

Dop = MatrixMult(np.random.normal(0.0, 1.0, (par["ny"], par["nx"])))
Expand All @@ -82,10 +72,6 @@ def test_TorchOperator_batch(par):
@pytest.mark.parametrize("par", [(par1)])
def test_TorchOperator_batch_nd(par):
"""Apply forward for input with multiple samples (= batch) and nd-arrays"""
# temporarily, skip tests on mac as torch seems not to recognized
# numpy when v2 is installed
if platform.system() == "Darwin":
return
device = "cpu" if backend == "numpy" else "cuda"

Dop = MatrixMult(np.random.normal(0.0, 1.0, (par["ny"], par["nx"])), otherdims=(2,))
Expand Down
Loading