Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mganahl committed Jan 27, 2021
2 parents ba88d50 + 72bb96c commit a8b294f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements_travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ tensorflow>=2.0.0
pytest
torch>=1.4.0
jax>=0.1.68
jaxlib==0.1.57
jaxlib>=0.1.59
pylint==2.5.3
7 changes: 5 additions & 2 deletions tensornetwork/tests/ncon_interface_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ def test_return_type(backend):
result_1 = ncon_interface.ncon([t1, t2], [(-1, 1), (1, -2)], backend=backend)
result_2 = ncon_interface.ncon([n1, n2], [(-1, 1), (1, -2)], backend=backend)
result_3 = ncon_interface.ncon([n1, t2], [(-1, 1), (1, -2)], backend=backend)
assert isinstance(result_1, type(n1.backend.convert_to_tensor(t1)))
assert isinstance(result_2, Tensor)
assert isinstance(result_3, type(n1.backend.convert_to_tensor(t1)))
if backend not in ('jax', get_backend('jax')):
# jitted functions return jaxlib.xla_extension.Buffer,
# convert_to_tensor returns jax.interpreters.xla._DeviceArray now.
assert isinstance(result_1, type(n1.backend.convert_to_tensor(t1)))
assert isinstance(result_3, type(n1.backend.convert_to_tensor(t1)))


def test_order_spec(backend):
Expand Down

0 comments on commit a8b294f

Please sign in to comment.