0

How can I stack or join numpy recarrays without getting errors like:

    self.data = numpy.lib.recfunctions.stack_arrays((self.data, data))# , asrecarray=True) # works
  File "/usr/local/lib/python3.2/site-packages/numpy/lib/recfunctions.py", line 747, in stack_arrays
    (dict(newdescr)[name], descr[1]))
TypeError: Incompatible type '<U72' <> '<U56'

I start with a dtype=object so I don't understand why its getting some things cast down to '

kgf3JfUtW
  • 13,702
  • 10
  • 57
  • 80
mathtick
  • 6,487
  • 13
  • 56
  • 101
  • What are the types of `data` and `self.data` if you inspect them yourself? You could cast one or both of them to a different type (using `astype`) for this call. – John Lyon May 01 '12 at 23:16
  • I have cast them as far as I was concerned. I think I even tried with ' – mathtick May 02 '12 at 01:39
  • 1
    Maybe this helps? http://www.mail-archive.com/numpy-discussion@scipy.org/msg15088.html What are the data sources for `data` and `self.data`? – John Lyon May 02 '12 at 02:01
  • I think I'm getting somewhere by avoiding using ' – mathtick May 02 '12 at 02:46

0 Answers0