Dear Fipyers,

May I know how to quickly assign zero to negative values in a cellvariable?
It could be achieved in the following loop format, but I think there might
be an easier method to do it, which I'm not aware of.

for j in range(n):
    if a.value(j)>0:
        a.value(j) =0

Thank you.

Best regards,
Rose

-- 
Yuan (Rose) Wang
PhD Candidate, Tufts University
Cellphone: 617-699-8006
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to