Create a two-dimensional array. Args: shape (`tuple`): Size of each dimension. dtype (`str`): Name of the data type. Example: ```py >>> from datasets import Features >>> features = Features({'x': Array2D(shape=(1, 3), dtype='int32')})
| 589 | |
| 590 | @dataclass |
| 591 | class Array2D(_ArrayXD): |
| 592 | """Create a two-dimensional array. |
| 593 | |
| 594 | Args: |
| 595 | shape (`tuple`): |
| 596 | Size of each dimension. |
| 597 | dtype (`str`): |
| 598 | Name of the data type. |
| 599 | |
| 600 | Example: |
| 601 | |
| 602 | ```py |
| 603 | >>> from datasets import Features |
| 604 | >>> features = Features({'x': Array2D(shape=(1, 3), dtype='int32')}) |
| 605 | ``` |
| 606 | """ |
| 607 | |
| 608 | shape: tuple |
| 609 | dtype: str |
| 610 | id: Optional[str] = field(default=None, repr=False) |
| 611 | # Automatically constructed |
| 612 | _type: str = field(default="Array2D", init=False, repr=False) |
| 613 | |
| 614 | |
| 615 | @dataclass |
no outgoing calls