Print ndarray for debugging.
(nd)
| 738 | yield tuple(sample(pool, r)) |
| 739 | |
| 740 | def ndarray_print(nd): |
| 741 | """Print ndarray for debugging.""" |
| 742 | try: |
| 743 | x = nd.tolist() |
| 744 | except (TypeError, NotImplementedError): |
| 745 | x = nd.tobytes() |
| 746 | if isinstance(nd, ndarray): |
| 747 | offset = nd.offset |
| 748 | flags = nd.flags |
| 749 | else: |
| 750 | offset = 'unknown' |
| 751 | flags = 'unknown' |
| 752 | print("ndarray(%s, shape=%s, strides=%s, suboffsets=%s, offset=%s, " |
| 753 | "format='%s', itemsize=%s, flags=%s)" % |
| 754 | (x, nd.shape, nd.strides, nd.suboffsets, offset, |
| 755 | nd.format, nd.itemsize, flags)) |
| 756 | sys.stdout.flush() |
| 757 | |
| 758 | |
| 759 | ITERATIONS = 100 |
nothing calls this directly
no test coverage detected