(out, in_)
| 55 | |
| 56 | |
| 57 | def consistent_subclass(out, in_): |
| 58 | # For ndarray subclass input, our output should have the same subclass |
| 59 | # (non-ndarray input gets converted to ndarray). |
| 60 | return type(out) is (type(in_) if isinstance(in_, np.ndarray) |
| 61 | else np.ndarray) |
| 62 | |
| 63 | |
| 64 | old_assert_almost_equal = assert_almost_equal |