(self, op, typename)
| 77 | param_names = ['op', 'type'] |
| 78 | |
| 79 | def setup(self, op, typename): |
| 80 | np.seterr(all='ignore') |
| 81 | |
| 82 | self.func = getattr(np.linalg, op) |
| 83 | |
| 84 | if op == 'cholesky': |
| 85 | # we need a positive definite |
| 86 | self.a = np.dot(get_squares_()[typename], |
| 87 | get_squares_()[typename].T) |
| 88 | else: |
| 89 | self.a = get_squares_()[typename] |
| 90 | |
| 91 | # check that dtype is supported at all |
| 92 | try: |
| 93 | self.func(self.a[:2, :2]) |
| 94 | except TypeError as e: |
| 95 | raise NotImplementedError() from e |
| 96 | |
| 97 | def time_op(self, op, typename): |
| 98 | self.func(self.a) |
nothing calls this directly
no test coverage detected