← Back to team overview

yade-users team mailing list archive

[Question #699714]: Python problems in Yade 2021.01a

 

New question #699714 on Yade:
https://answers.launchpad.net/yade/+question/699714

In the name of god

Hi every one.

I encountered a problem in my compiled YADE 2021.01a. i wrote a simple code to be run but i received an strange error:
##################################
In [1]: b=[1,2,3];c=[b,b,b,]                                                                                                         
In [2]: for kk in c: 
   ...:              a=[x/max(kk) for x in kk] 

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
~/YadeGit/master2021Hertz/install/bin/yade-2021.01a in <module>
      1 for kk in c:
----> 2     a=[x/max(kk) for x in kk]
      3 

~/YadeGit/master2021Hertz/install/bin/yade-2021.01a in <listcomp>(.0)
      1 for kk in c:
----> 2     a=[x/max(kk) for x in kk]
      3 

NameError: name 'kk' is not defined
##########################################
I checked the code for both python 2 and 3 and there was no problem.

Any help?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.