hh=[[82.5], [168.5]]
N=1./5
ll=N*hh
What I'm doing wrong? I received error :
"can't multiply sequence by non-int of
type 'float'"
I try to add float(), but this is not solve my problem;
I need to multiply each element in array...
thanks to all
**Ok thanks for idea for number * array, but how to multiply array*array, I tried same as number*array, but have problems:
EDIT 2:**
hh=[[82.5], [168.5]]
N=zip(*hh)
ll = [[x*N for x in y] for y in hh]
???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…