Ticket #3183 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

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:
Platform Version: Platform: All
Must Fix for Release: No 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

Changed 3 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.

Changed 3 years ago by borysiasty

  • owner changed from nobody to Barryrowlingson
  • component changed from Rasters to Python plugins and bindings

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 :)

Changed 3 years ago by borysiasty

  • status changed from new to closed
  • resolution set to invalid
Note: See TracTickets for help on using tickets.