Skip to content

Crashes when I do a generation #55

@rhombicosidodecahedronreal-hue

Description

TypeError: only 0-dimensional arrays can be converted to Python scalars

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\25-09256\Documents\GitHub\jes\jes.py", line 36, in
ui.detectEvents()
~~~~~~~~~~~~~~~^^
File "C:\Users\25-09256\Documents\GitHub\jes\jes_ui.py", line 396, in detectEvents
button.click()
~~~~~~~~~~~~^^
File "C:\Users\25-09256\Documents\GitHub\jes\jes_button.py", line 29, in click
self.func(self)
~~~~~~~~~^^^^^^
File "C:\Users\25-09256\Documents\GitHub\jes\jes_sim.py", line 212, in doGeneration
nextCreatures[winner] = self.mutate(self.creatures[gen][winner],(gen+1)*self.c_count+winner)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\25-09256\Documents\GitHub\jes\jes_sim.py", line 244, in mutate
newDNA, newSpecies, cwc = parent.getMutatedDNA(self)
~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\25-09256\Documents\GitHub\jes\jes_creature.py", line 117, in getMutatedDNA
result[big_mut_loc+i] += delta
~~~~~~^^^^^^^^^^^^^^^
ValueError: setting an array element with a sequence.

What could be the problem behind this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions