Changeset 38a9b07 in sasmodels for sasmodels/model_test.py


Ignore:
Timestamp:
Apr 18, 2016 6:31:29 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
f2f67a6 (diff), 82923a6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into polydisp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/model_test.py

    r0ff62d4 r38a9b07  
    259259                    self.assertTrue(np.isfinite(actual_yi), 
    260260                                    'invalid f(%s): %s' % (xi, actual_yi)) 
     261                elif np.isnan(yi): 
     262                    self.assertTrue(np.isnan(actual_yi), 
     263                                    'f(%s): expected:%s; actual:%s' 
     264                                    % (xi, yi, actual_yi)) 
    261265                else: 
    262                     self.assertTrue(is_near(yi, actual_yi, 5), 
     266                    # is_near does not work for infinite values, so also test 
     267                    # for exact values.  Note that this will not 
     268                    self.assertTrue(yi==actual_yi or is_near(yi, actual_yi, 5), 
    263269                                    'f(%s); expected:%s; actual:%s' 
    264270                                    % (xi, yi, actual_yi)) 
Note: See TracChangeset for help on using the changeset viewer.