(x)
| 15 | |
| 16 | |
| 17 | def set_framework_dependencies(x): |
| 18 | if type(x) is numpy.ndarray: |
| 19 | to_dtype = lambda a: a |
| 20 | fw = numpy |
| 21 | else: |
| 22 | to_dtype = lambda a: a.to(x.dtype) |
| 23 | fw = torch |
| 24 | eps = fw.finfo(fw.float32).eps |
| 25 | return fw, to_dtype, eps |
| 26 | |
| 27 | |
| 28 | def support_sz(sz): |