Opened 9 years ago

Closed 9 years ago

#3183 closed bug (invalid)

rasterlang

Reported by: tsw Owned by: Barryrowlingson
Priority: critical: causes crash or data corruption Milestone: Version 1.6.0
Component: Python plugins and bindings Version:
Keywords: rasterlang, possible patch Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

the equality operator does not work. In ops.py the current code exists:

def eq(*args):

debug.msg(1,"eq test ",args) for i in range(1,len(args)):

if args[0]!=args[i]:

return False

return True

the comparison between args[0] nad args[i] generates a bug suggesting calls to a.all() or a.any().

There is no need for a special eq operator. So replacing the line

'=': Op('=',eq,2,99,"test equality"),

with

'=': Op('=',operator.eq,2,2,"test equality"),

in ops.py produces a basic functioning equality operation for this plugin.

Change History (3)

comment:1 Changed 9 years ago by tsw

Additional Information. The copy of the plugin provided by Barry on his website to download does not have this bug and is different from the code of his repository. His fix is slightly different from the one I suggest, but it does work.

comment:2 Changed 9 years ago by borysiasty

Component: RastersPython plugins and bindings
Owner: changed from nobody to Barryrowlingson

This is an external plugin - please contact authors rather than use this trac. I'm assigning it to Barry and closing it. Barry, feel poked :)

comment:3 Changed 9 years ago by borysiasty

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.