Skip to content

Error: "The truth value of an array with more than one element is ambiguous" #19

Description

@mtewes

As reported to us by a user: the following error is raised when running either of

pycs.sim.draw.multidraw(lcs, onlycopy=True, n=20, npkl=10, simset="copies")
pycs.sim.run.multirun("copies", lcs, myopt.spl, optset="spl1", tsrand=5.0)

Traceback:


Start
opt_ts_indi brute done
opt_ts_indi fine done
opt_ml done
opt_source BOK done
BA  +10.65    (Iteration 15, r2 =    377.9)
Timeshift stabilization and releasing of splflat :
BA  +10.65    (Iteration  1, r2 =    377.9)
BA  +10.65    (Iteration  2, r2 =    377.9)
BA  +10.65    (Iteration  3, r2 =    377.9)
BA  +10.65    (Iteration  4, r2 =    377.9)
BA  +10.65    (Iteration  5, r2 =    377.9)
Shifted 20 simulations, using 1 CPU, time : 11
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycs/sim/run.py", line 435, in multirun
   rr = runresults(simlcslist, qs = qs, name="sims_%s_opt_%s" % (simset, optset))
 File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycs/sim/run.py", line 130, in __init__
   if qs != None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions