(out, in_)
| 31 | |
| 32 | |
| 33 | def consistent_subclass(out, in_): |
| 34 | # For ndarray subclass input, our output should have the same subclass |
| 35 | # (non-ndarray input gets converted to ndarray). |
| 36 | return type(out) is (type(in_) if isinstance(in_, np.ndarray) |
| 37 | else np.ndarray) |
| 38 | |
| 39 | |
| 40 | old_assert_almost_equal = assert_almost_equal |