Nov. 12, 2015
8:05 a.m.
thank you for help import itertools import numpy as np ncols = 3 start, stop, step = 0.0, 1.0, 0.2 iterable = np.arange(start, stop+step/2, step) mixing_ratios = itertools.product(iterable, repeat=ncols) mixing_ratios = [i for i in mixing_ratios if np.isclose(sum(i), 1.0)] On 11.11.2015 19:12, elmar werling wrote:
Hi,
is there a function foo(ncols, min, max, delta) in mumpy/scipy to create an array such as
0 100 0 0 0 100 10 90 0 10 80 10 10 70 20 10 60 30 10 50 40 10 40 50 10 30 60 20 20 70 20 10 80 20 0 90 20 80 0 ... ... ... 90 10 0 90 0 10 100 0 0
Any help or link is welcome
Elmar