Jonathan, I think I got the error because I was trying to do a.value = b*c, where b and c are CellVariables. b * c become an operator variable, which cannot be assigned to the LHS (numpy arrary). a = b*c should work if all of them are CellVariables.
Sorry for the confusion and thank you for your help. Best regards, Rose On Mon, Jan 27, 2014 at 10:39 AM, Guyer, Jonathan E. Dr. < jonathan.gu...@nist.gov> wrote: > > On Jan 24, 2014, at 5:11 PM, yuan wang <rose.w...@tufts.edu> wrote: > > > All the operations made on CellVariables will be stored as > binaryOperatorVariables. The operation is not actually conducted, until the > result is requested by numpy.array() or .value operation. It's like the > operations are just doing book keeping of the account, but the > numpy.array() method encash the final values. Even though, the operators > will work the same on CellVariables as on numpy arrays. > > As Daniel said, this is an accurate understanding. > > > > I wrote something like a = b*c, but it does not work. An error pop up > saying, "TypeError: The value of an `_OperatorVariable` cannot be assigned" > > Can you tell us exactly what you did to generate this error? It is not > possible to have gotten this error from writing "a = b*c", no matter what > a, b, or c are. Python syntax just doesn't work that way. > > I believe you got the error, and if you tell us exactly what code you > wrote and what you are trying to accomplish, it will help us direct you to > the right expression. > > > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > -- Yuan (Rose) Wang PhD Candidate, Tufts University Cellphone: 617-699-8006
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]