(shape)
| 574 | |
| 575 | |
| 576 | def _deprecate_shape_0_as_None(shape): |
| 577 | if shape == 0: |
| 578 | warnings.warn( |
| 579 | "Passing `shape=0` to have the shape be inferred is deprecated, " |
| 580 | "and in future will be equivalent to `shape=(0,)`. To infer " |
| 581 | "the shape and suppress this warning, pass `shape=None` instead.", |
| 582 | FutureWarning, stacklevel=3) |
| 583 | return None |
| 584 | else: |
| 585 | return shape |
| 586 | |
| 587 | |
| 588 | @set_module("numpy.rec") |
no test coverage detected