(shape, dtype=str)
| 1735 | class TestZeroSizeFlexible: |
| 1736 | @staticmethod |
| 1737 | def _zeros(shape, dtype=str): |
| 1738 | dtype = np.dtype(dtype) |
| 1739 | if dtype == np.void: |
| 1740 | return np.zeros(shape, dtype=(dtype, 0)) |
| 1741 | |
| 1742 | # not constructable directly |
| 1743 | dtype = np.dtype([('x', dtype, 0)]) |
| 1744 | return np.zeros(shape, dtype=dtype)['x'] |
| 1745 | |
| 1746 | def test_create(self): |
| 1747 | zs = self._zeros(10, bytes) |
no test coverage detected