Comment attribuer une valeur de chaîne en un tableau numpy?

Lorsque j'essaie d'assigner une chaîne dans un tableau comme ceci:

CoverageACol[0,0] = "Hello" 

J'obtiens l'erreur suivante

Traceback (most recent call last):
  File "<pyshell#19>", line 1, in <module>
    CoverageACol[0,0] = "hello"
ValueError: setting an array element with a sequence.

Cependant, en attribuant un nombre entier n'est pas une erreur:

CoverageACol[0,0] = 42

CoverageACol est un tableau numpy.

S'il vous plaît aider! Merci!

InformationsquelleAutor Moose | 2011-08-09