Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.
Merged
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
8 changes: 4 additions & 4 deletions tensornetwork/network_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self,
"""

self.is_disabled = False
if not name:
if name is None:
name = '__unnamed_node__'
else:
if not isinstance(name, str):
Expand Down Expand Up @@ -554,7 +554,7 @@ def __init__(self,
#always use the `Node`'s backend
backend = tensor.backend
tensor = tensor.tensor
if not backend:
if backend is None:
backend = get_default_backend()
if isinstance(backend, BaseBackend):
backend_obj = backend
Expand Down Expand Up @@ -715,7 +715,7 @@ def __init__(self,
backend with a tf.Dtype=tf.floa32, `dtype` has to be `np.float32`.
"""

if not backend:
if backend is None:
backend = get_default_backend()
backend_obj = backend_factory.get_backend(backend)

Expand Down Expand Up @@ -924,7 +924,7 @@ def __init__(self,
raise ValueError(
"node2 and axis2 must either be both None or both not be None")
self.is_disabled = False
if not name:
if name is None:
name = '__unnamed_edge__'
else:
if not isinstance(name, str):
Expand Down