9b8ad4977dd57c82b11145419ad4238cf9f7342e,tensorly/tests/test_backend.py,,test_set_backend,#,15
Before Change
def test_set_backend():
tensor = T.tensor(np.arange(12).reshape((4, 3)))
tensor2 = tl.tensor(np.arange(12).reshape((4, 3)))
assert T.is_tensor(tensor)
assert T.is_tensor(tensor2)
After Change
assert tl.get_backend() == toplevel_backend
// Improper name doesn"t reset backend
with assert_raises(ValueError):
tl.set_backend("not-a-real-backend")
assert tl.get_backend() == toplevel_backend
def test_backend_and_tensorly_module_attributes():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: tensorly/tensorly
Commit Name: 9b8ad4977dd57c82b11145419ad4238cf9f7342e
Time: 2018-09-28
Author: jiminy.crist@gmail.com
File Name: tensorly/tests/test_backend.py
Class Name:
Method Name: test_set_backend
Project Name: dmlc/dgl
Commit Name: 8651be54c27acbec3b4b8d84a4435a548aebb39b
Time: 2019-03-07
Author: zhengda1936@gmail.com
File Name: python/dgl/nodeflow.py
Class Name: NodeFlow
Method Name: block_compute
Project Name: ilastik/ilastik
Commit Name: 5a0373b2cdb1222e7c9816c0fc88e22fda743647
Time: 2014-08-13
Author: bergs@janelia.hhmi.org
File Name: lazyflow/operators/opBlockedArrayCache.py
Class Name: OpBlockedArrayCache
Method Name: setupOutputs