added range specicification
This commit is contained in:
@@ -316,6 +316,12 @@ def sequence_from_specs(
|
||||
return np.arange(start, stop + step, step)
|
||||
if kind == "linear":
|
||||
return np.linspace(start, stop, num)
|
||||
elif kind == "range": # stop -> step
|
||||
try:
|
||||
return np.arange(start, start + num * stop, stop)
|
||||
except Exception as e:
|
||||
e.add_note(f"Trying to build range sequence from {start=}, step={stop}, {num=}")
|
||||
raise
|
||||
elif kind == "geometric":
|
||||
return np.geomspace(start, stop, num)
|
||||
elif kind == "geometric0":
|
||||
|
||||
Reference in New Issue
Block a user