Skip to content

Commit d04557d

Browse files
committed
update docs
1 parent ca6196d commit d04557d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/user-guide/data_types.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -412,17 +412,17 @@ attempt data type resolution against *every* data type class, and if, for some r
412412
type matches multiple Zarr data types, we treat this as an error and raise an exception.
413413

414414
If you have a NumPy data type and you want to get the corresponding ``ZDType`` instance, you can use
415-
the ``parse_data_type`` function, which will use the dynamic resolution described above. ``parse_data_type``
415+
the ``parse_dtype`` function, which will use the dynamic resolution described above. ``parse_dtype``
416416
handles a range of input types:
417417

418418
- NumPy data types:
419419

420420
.. code-block:: python
421421
422422
>>> import numpy as np
423-
>>> from zarr.dtype import parse_data_type
423+
>>> from zarr.dtype import parse_dtype
424424
>>> my_dtype = np.dtype('>M8[10s]')
425-
>>> parse_data_type(my_dtype, zarr_format=2)
425+
>>> parse_dtype(my_dtype, zarr_format=2)
426426
DateTime64(endianness='big', scale_factor=10, unit='s')
427427
428428
@@ -431,7 +431,7 @@ handles a range of input types:
431431
.. code-block:: python
432432
433433
>>> dtype_str = '>M8[10s]'
434-
>>> parse_data_type(dtype_str, zarr_format=2)
434+
>>> parse_dtype(dtype_str, zarr_format=2)
435435
DateTime64(endianness='big', scale_factor=10, unit='s')
436436
437437
- ``ZDType`` instances:
@@ -440,7 +440,7 @@ handles a range of input types:
440440
441441
>>> from zarr.dtype import DateTime64
442442
>>> zdt = DateTime64(endianness='big', scale_factor=10, unit='s')
443-
>>> parse_data_type(zdt, zarr_format=2) # Use a ZDType (this is a no-op)
443+
>>> parse_dtype(zdt, zarr_format=2) # Use a ZDType (this is a no-op)
444444
DateTime64(endianness='big', scale_factor=10, unit='s')
445445
446446
- Python dictionaries (requires ``zarr_format=3``). These dictionaries must be consistent with the
@@ -449,7 +449,7 @@ handles a range of input types:
449449
.. code-block:: python
450450
451451
>>> dt_dict = {"name": "numpy.datetime64", "configuration": {"unit": "s", "scale_factor": 10}}
452-
>>> parse_data_type(dt_dict, zarr_format=3)
452+
>>> parse_dtype(dt_dict, zarr_format=3)
453453
DateTime64(endianness='little', scale_factor=10, unit='s')
454-
>>> parse_data_type(dt_dict, zarr_format=3).to_json(zarr_format=3)
454+
>>> parse_dtype(dt_dict, zarr_format=3).to_json(zarr_format=3)
455455
{'name': 'numpy.datetime64', 'configuration': {'unit': 's', 'scale_factor': 10}}

0 commit comments

Comments
 (0)