|
51 | 51 | "create_array", |
52 | 52 | "create_hierarchy", |
53 | 53 | "create_nodes", |
54 | | - "create_rooted_hierarchy", |
55 | 54 | "empty", |
56 | 55 | "empty_like", |
57 | 56 | "full", |
58 | 57 | "full_like", |
59 | | - "get_node", |
60 | 58 | "group", |
61 | 59 | "load", |
62 | 60 | "ones", |
@@ -1208,61 +1206,3 @@ def create_nodes( |
1208 | 1206 |
|
1209 | 1207 | for key, value in sync(_collect_aiterator(coro)): |
1210 | 1208 | yield key, _parse_async_node(value) |
1211 | | - |
1212 | | - |
1213 | | -def create_rooted_hierarchy( |
1214 | | - *, |
1215 | | - store: Store, |
1216 | | - nodes: dict[str, GroupMetadata | ArrayV2Metadata | ArrayV3Metadata], |
1217 | | - overwrite: bool = False, |
1218 | | -) -> Group | Array: |
1219 | | - """ |
1220 | | - Create a Zarr hierarchy with a root, and return the root node, which could be a ``Group`` |
1221 | | - or ``Array`` instance. |
1222 | | -
|
1223 | | - Parameters |
1224 | | - ---------- |
1225 | | - store : Store |
1226 | | - The storage backend to use. |
1227 | | - path : str |
1228 | | - The name of the root of the created hierarchy. Every key in ``nodes`` will be prefixed with |
1229 | | - ``path`` prior to creating nodes. |
1230 | | - nodes : dict[str, GroupMetadata | ArrayV3Metadata | ArrayV2Metadata] |
1231 | | - A dictionary defining the hierarchy. The keys are the paths of the nodes |
1232 | | - in the hierarchy, and the values are the metadata of the nodes. The |
1233 | | - metadata must be either an instance of GroupMetadata, ArrayV3Metadata |
1234 | | - or ArrayV2Metadata. |
1235 | | - overwrite : bool |
1236 | | - Whether to overwrite existing nodes. Default is ``False``. |
1237 | | -
|
1238 | | - Returns |
1239 | | - ------- |
1240 | | - Group | Array |
1241 | | - """ |
1242 | | - async_node = sync( |
1243 | | - async_api.create_rooted_hierarchy(store=store, nodes=nodes, overwrite=overwrite) |
1244 | | - ) |
1245 | | - return _parse_async_node(async_node) |
1246 | | - |
1247 | | - |
1248 | | -def get_node(store: Store, path: str, zarr_format: ZarrFormat) -> Array | Group: |
1249 | | - """ |
1250 | | - Get an Array or Group from a path in a Store. |
1251 | | -
|
1252 | | - Parameters |
1253 | | - ---------- |
1254 | | - store : Store |
1255 | | - The store-like object to read from. |
1256 | | - path : str |
1257 | | - The path to the node to read. |
1258 | | - zarr_format : {2, 3} |
1259 | | - The zarr format of the node to read. |
1260 | | -
|
1261 | | - Returns |
1262 | | - ------- |
1263 | | - Array | Group |
1264 | | - """ |
1265 | | - |
1266 | | - return _parse_async_node( |
1267 | | - sync(async_api.get_node(store=store, path=path, zarr_format=zarr_format)) |
1268 | | - ) |
0 commit comments