|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
3 | 3 | import json |
4 | | -import warnings |
5 | 4 | from asyncio import gather |
6 | 5 | from dataclasses import dataclass, field |
7 | 6 | from itertools import starmap |
@@ -1161,9 +1160,11 @@ async def append(self, data: npt.ArrayLike, axis: int = 0) -> ChunkCoords: |
1161 | 1160 | data_shape_preserved = tuple(s for i, s in enumerate(data.shape) if i != axis) |
1162 | 1161 | if self_shape_preserved != data_shape_preserved: |
1163 | 1162 | raise ValueError( |
1164 | | - "shape of data to append is not compatible with the array; " |
1165 | | - "all dimensions must match except for the dimension being " |
1166 | | - "appended" |
| 1163 | + f"shape of data to append is not compatible with the array. " |
| 1164 | + f"The shape of the data is ({data_shape_preserved})" |
| 1165 | + f"and the shape of the array is ({self_shape_preserved})." |
| 1166 | + "All dimensions must match except for the dimension being " |
| 1167 | + "appended." |
1167 | 1168 | ) |
1168 | 1169 | # remember old shape |
1169 | 1170 | old_shape = self.shape |
@@ -1356,16 +1357,7 @@ def shape(self) -> ChunkCoords: |
1356 | 1357 |
|
1357 | 1358 | @shape.setter |
1358 | 1359 | def shape(self, value: ChunkCoords) -> None: |
1359 | | - """Sets the shape of the array by calling resize. |
1360 | | -
|
1361 | | - .. deprecated:: 3.0.0 |
1362 | | - Setting a shape using the shape setter is deprecated, use Array.resize instead. |
1363 | | - """ |
1364 | | - warnings.warn( |
1365 | | - "Setting a shape using the shape setter is deprecated, use Array.resize instead.", |
1366 | | - stacklevel=2, |
1367 | | - category=DeprecationWarning, |
1368 | | - ) |
| 1360 | + """Sets the shape of the array by calling resize.""" |
1369 | 1361 | self.resize(value) |
1370 | 1362 |
|
1371 | 1363 | @property |
|
0 commit comments