a=NP.ones (shape=[ 8,1 ] ) ) ) ) ) ) ) ) ) ) )。
b=NP.zeros (shape=[ 8,1 ] ) ) ) ) ) ) ) ) ) ) ) )。
c=NP.hstack(a,b ) ) ) )。
ctypeerrortraceback (mostrecentcalllast )。
in
1a=NP.ones (shape=[ 8,1 ] ) ) ) ) ) ) ) ) 1a ) ) ) ) ) ) )。
2b=NP.zeros (shape=[ 8,1 ] ) ) ) ) ) ) ) ) 2b=NP.zeros (shape=[ 8,1 ] ) ) ) ) ) ) ) 2b ) ) ) 2b ) 2b ) ) ) 28 ) 28 )
----3c=NP.hstack(a,b ) ) ) )。
4 c
33558 www.Sina.com/internalsinhstack (* args,**kwargs ) )。
typeerror : _ VH stack _ dispatcher (takes1positionalargumentbut2were given
要修改为c=NP.hstack([a,b] ),必须在括号中传递多个对象。 否则,除了第一个对象作为指定参数传递以外的其他对象将作为函数的另一个参数传递,并且其他属性会执行错误的结果。 如果这里没有结果,我会报告错误。