-
Notifications
You must be signed in to change notification settings - Fork 157
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
Give helpfull error on - or / of meshes #203
Comments
benny.malengier@gmail.com attached minus.patch on 06-29-2010 at 09:32 |
Fixed with r4761 Trac comment by wd15 on 09-20-2011 at 15:18 |
I agree that the previous error wasn't very helpful, but wouldn't it be better to just support the operations instead of raising a slightly clearer error? Trac comment by guyer on 09-20-2011 at 18:22 |
sub does work now. Line
Trac comment by wd15 on 10-07-2011 at 15:50 |
Added div method with r299. Closing. Trac comment by wd15 on 10-11-2011 at 15:58 |
Replying to wd15:
Trac comment by wd15 on 10-11-2011 at 15:59 |
When translating meshes, one cannot do
mesh = Grid2D(dx=dx, dy=dy, nx=nxtot, ny=nytot) - [[Lval/2], [0]]
but must do
mesh = Grid2D(dx=dx, dy=dy, nx=nxtot, ny=nytot) + [[-Lval/2], [0]]
The error given in the first case is not very helpfull for unexperience users:
TypeError: unsupported operand type(s) for -: 'instance' and 'list'
The patch in attachment adds sub and div and gives helpfull error message in those cases.
Imported from trac ticket #299, created by benny.malengier@gmail.com on 06-29-2010 at 09:32, last modified: 10-11-2011 at 15:59
The text was updated successfully, but these errors were encountered: