replace ndarray.__str__ temporarily
(s)
| 574 | |
| 575 | @contextmanager |
| 576 | def inject_str(s): |
| 577 | """ replace ndarray.__str__ temporarily """ |
| 578 | set_string_function(lambda x: s, repr=False) |
| 579 | try: |
| 580 | yield |
| 581 | finally: |
| 582 | set_string_function(None, repr=False) |
| 583 | |
| 584 | a1d = np.array(['test']) |
| 585 | a0d = np.array('done') |
nothing calls this directly
no test coverage detected