Skip to content

Commit

Permalink
Fixes issue comparing with dataset object
Browse files Browse the repository at this point in the history
  • Loading branch information
holm10 committed Dec 6, 2023
1 parent 4e0c25d commit fbbb8d9
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down
4 changes: 2 additions & 2 deletions pytests/templates/tests/test_uedge.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def matches(save, refs, epsilon):
recoverstate(save, refs)
fnrm = bbb.get_fnrm(bbb.dtreal)
print('TEST RESULTS')
print(' REFERENCE', refs['fnrm'])
print(' REFERENCE', refs['fnrm'][()])
print(' RESULT', fnrm)
return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon)
return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon)


def print_itroub(refs):
Expand Down

0 comments on commit fbbb8d9

Please sign in to comment.