I want to concatenate numpy arrays. The error that I get is : ValueError: 0-d arrays can't be concatenated
The code is the following:
n = len(names)
#print names
print n
pairs = concatenate(array([[(j,i) for j in xrange(i)] for i in xrange(1,n)]))
I just don't now how to solve this. I would be great if someone could help me.
Cheers, M
concatenate([[(j,i) for j in xrange(i)] for i in xrange(1,n)])? the error is becauseconcatenateexpects a list/tuple as input, not a single array.ValueError: 0-d arrays can't be concatenated". Actually that's not the error you get. You get an error message that starts withTracebackand ends with that line. All those lines are important and you should always post the whole output you get, not just the last line. The fact that you aren't able to understand what the rest means, doesn't mean that we can't understand it.