Commit 15e7708b authored by Martin Reinecke's avatar Martin Reinecke
Browse files


parent 1a9d2d22
......@@ -37,6 +37,7 @@ class DomainTuple(object):
via the factory function :attr:`make`!
_tupleCache = {}
_scalarDomain = None
def __init__(self, domain, _callingfrommake=False):
if not _callingfrommake:
......@@ -150,3 +151,9 @@ class DomainTuple(object):
for i in self:
res += "\n" + str(i)
return res
def scalar_domain():
if DomainTuple._scalarDomain is None:
DomainTuple._scalarDomain = DomainTuple.make(())
return DomainTuple._scalarDomain
......@@ -33,8 +33,8 @@ __all__ = ["get_slice_list", "safe_cast", "parse_spaces", "infer_space",
"my_product", "frozendict", "special_add_at"]
def my_sum(terms):
return reduce(lambda x, y: x+y, terms)
def my_sum(iterable):
return reduce(lambda x, y: x+y, iterable)
def my_lincomb_simple(terms, factors):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment