Skip to content
Prev Previous commit
Next Next commit
[TEST] add tests for the 'type_as' backends
  • Loading branch information
Francisco Muñoz committed Oct 13, 2023
commit 2afd2317858df27a3e66eb8c525999039e4f58ea
12 changes: 5 additions & 7 deletions test/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
#
# License: MIT License

import ot
import ot.backend
from ot.backend import torch, jax, tf

import pytest

import numpy as np
import pytest
from numpy.testing import assert_array_almost_equal_nulp

from ot.backend import get_backend, get_backend_list, to_numpy
import ot
import ot.backend
from ot.backend import get_backend, get_backend_list, jax, tf, to_numpy, torch


def test_get_backend_list():
Expand Down Expand Up @@ -507,6 +504,7 @@ def test_func_backends(nx):
lst_name.append('std')

A = nx.linspace(0, 1, 50)
A = nx.linspace(0, 1, 50, type_as=Mb)
lst_b.append(nx.to_numpy(A))
lst_name.append('linspace')

Expand Down