[Numpy-discussion] hstack

Paulo Jabardo pjabardo at yahoo.com.br
Wed Feb 8 11:39:38 EST 2012


The problem is that hstack needs a tuple as argument:

x = ones( (9,1) )
y = zeros( (9,2) )
z = hstack( (x,y) )

Notice the parenthesis in the arguments.

Paulo


________________________________
 De: Stephanie Cooke <cooke.stephanie at gmail.com>
Para: numpy-discussion at scipy.org 
Enviadas: Quarta-feira, 8 de Fevereiro de 2012 14:32
Assunto: [Numpy-discussion] hstack
 
Hello,

When I try to use the command hstack, I am given the error message
"TypeError: hstack() takes exactly 1 argument (2 given)". I have a 9X1
array (called array) that I would like to concatenate to a 9X2 matrix
(called matrix), and I try to do this by typing the command
hstack(array,matrix). I would appreciate any help in getting this to
work.

Thanks,

Stephanie
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion at scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120208/4e7b0fb5/attachment.html>


More information about the NumPy-Discussion mailing list