(state1, state2)
| 60 | |
| 61 | |
| 62 | def comp_state(state1, state2): |
| 63 | identical = True |
| 64 | if isinstance(state1, dict): |
| 65 | for key in state1: |
| 66 | identical &= comp_state(state1[key], state2[key]) |
| 67 | elif type(state1) != type(state2): |
| 68 | identical &= type(state1) == type(state2) |
| 69 | else: |
| 70 | if (isinstance(state1, (list, tuple, np.ndarray)) and isinstance( |
| 71 | state2, (list, tuple, np.ndarray))): |
| 72 | for s1, s2 in zip(state1, state2): |
| 73 | identical &= comp_state(s1, s2) |
| 74 | else: |
| 75 | identical &= state1 == state2 |
| 76 | return identical |
| 77 | |
| 78 | |
| 79 | def warmup(rg, n=None): |
no outgoing calls
no test coverage detected