-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line 85&86:if s_prev == None: s_prev = np.zeros_like(self.state.s) #28
Comments
one walk around is to replace that line by: This also happens to my Spyder 3.1.2 with Python 2.7.13 64bit. |
this change gets to work to me, @zhyma , thanks. but i'd like to know how because, i'm debugging the code here, and the expected class to |
@tldrafael You are correct. I just got it wrong. With "if not isinstance(s_prev,list)", it runs into resetting s_prev as a zeros_like matrix everytime. Although it is running, the 'H' cell and the 'C' cell are not working properly. Thanks for pointing that out! |
The problem seems that you can't compare an array to a single None. To solve that i compare the class of the object to Nonetype |
I think using "==" to compare different types is an out-of-date method. I remember it was running correctly on my other machine with an old version of Python but not the up-to-date one. Haven't checked the Python manual yet. |
when run test.py, there is a error.
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
changing the '==' of two lines to 'is' is right, it likes 'if s_prev is None: s_prev = np.zeros_like(self.state.s)'
The text was updated successfully, but these errors were encountered: