Opened 15 years ago

Closed 15 years ago

#232 closed defect (fixed)

maximum_inundation_from_sww test failing in windows

Reported by: duncan Owned by: Ole
Priority: normal Milestone:
Component: Architecture and API Version:
Severity: normal Keywords:
Cc: duncan, jane, nick


maximum_inundation_from_sww test failing in windows.

I think the changeset:4862 broke this. Could you fix this one Ole? The values of runup & maximal_runup are both None.

ERROR: test_get_maximum_inundation_from_sww(self)
Traceback (most recent call last):
  File "shallow_water\", line 1286, in test_get_maxi
    q = get_maximum_inundation_elevation('runup_test.sww')
  File "X:\anuga_core\source\anuga\shallow_water\", line 5512, in
  File "X:\anuga_core\source\anuga\shallow_water\", line 5724, in
    if runup > maximal_runup:
TypeError: function not supported for these types, and can't coerce to supported

Change History (1)

comment:1 Changed 15 years ago by ole

  • Cc duncan jane nick added
  • Resolution set to fixed
  • Status changed from new to closed

This was fixed in changeset:4863

The algorithm exploits the fact that x >= None evaluates to True and x < None evaluates to False for all numerical values of x.

However, the problem was that the only proper floats (or ints) can be compared to None - not the single precision values that have been reinstated in the sww file.

It has now been fixed by converting the arrays to Float (double precision) when read from the sww file.

Note: See TracTickets for help on using tickets.