Commit d9ad4682 authored by Daniel Boeckenhoff's avatar Daniel Boeckenhoff
Browse files

forgot, that to_base_vectors is used elsewhere

parent 20a3adcb
......@@ -1001,6 +1001,7 @@ class Tensors(AbstractNdarray):
Skalars
>>> t = tfields.Tensors(range(1, 6))
>>> t.moment(1)
>>> assert t.moment(1, weights=[-2, -1, 20, 1, 2]) == 0.5
>>> assert t.moment(2, weights=[0.25, 1, 17.5, 1, 0.25]) == 0.2
......
......@@ -15,7 +15,7 @@ def ensure_complex(*base_vectors):
return base_vectors
def _to_base_vectors(*base_vectors):
def to_base_vectors(*base_vectors):
"""
Transform tuples to arrays with np.mgrid
Args:
......@@ -100,7 +100,7 @@ def igrid(*base_vectors, **kwargs):
obj = np.mgrid[base_vectors]
obj = obj.reshape(obj.shape[0], -1).T
else:
base_vectors = _to_base_vectors(*base_vectors)
base_vectors = to_base_vectors(*base_vectors)
obj = np.empty(shape=(functools.reduce(lambda x, y: x * y,
map(len, base_vectors)),
......
Supports Markdown
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