nodes: 0, module; 1, function_definition; 2, function_name:init_array; 3, parameters; 4, block; 5, identifier:store; 6, identifier:shape; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15, default_parameter; 16, default_parameter; 17, expression_statement; 18, comment:# normalize path; 19, expression_statement; 20, comment:# ensure parent group initialized; 21, expression_statement; 22, expression_statement; 23, identifier:chunks; 24, True; 25, identifier:dtype; 26, None; 27, identifier:compressor; 28, string; 29, identifier:fill_value; 30, None; 31, identifier:order; 32, string; 33, identifier:overwrite; 34, False; 35, identifier:path; 36, None; 37, identifier:chunk_store; 38, None; 39, identifier:filters; 40, None; 41, identifier:object_codec; 42, None; 43, comment:"""Initialize an array store with the given configuration. Note that this is a low-level
      function and there should be no need to call this directly from user code.
  
      Parameters
      ----------
      store : MutableMapping
          A mapping that supports string keys and bytes-like values.
      shape : int or tuple of ints
          Array shape.
      chunks : int or tuple of ints, optional
          Chunk shape. If True, will be guessed from `shape` and `dtype`. If
          False, will be set to `shape`, i.e., single chunk for the whole array.
      dtype : string or dtype, optional
          NumPy dtype.
      compressor : Codec, optional
          Primary compressor.
      fill_value : object
          Default value to use for uninitialized portions of the array.
      order : {'C', 'F'}, optional
          Memory layout to be used within each chunk.
      overwrite : bool, optional
          If True, erase all data in `store` prior to initialisation.
      path : string, optional
          Path under which array is stored.
      chunk_store : MutableMapping, optional
          Separate storage for chunks. If not provided, `store` will be used
          for storage of both chunks and metadata.
      filters : sequence, optional
          Sequence of filters to use to encode chunk data prior to compression.
      object_codec : Codec, optional
          A codec to encode object arrays, only needed if dtype=object.
  
      Examples
      --------
      Initialize an array store::
  
          >>> from zarr.storage import init_array
          >>> store = dict()
          >>> init_array(store, shape=(10000, 10000), chunks=(1000, 1000))
          >>> sorted(store.keys())
          ['.zarray']
  
      Array metadata is stored as JSON::
  
          >>> print(store['.zarray'].decode())
          {
              "chunks": [
                  1000,
                  1000
              ],
              "compressor": {
                  "blocksize": 0,
                  "clevel": 5,
                  "cname": "lz4",
                  "id": "blosc",
                  "shuffle": 1
              },
              "dtype": "<f8",
              "fill_value": null,
              "filters": null,
              "order": "C",
              "shape": [
                  10000,
                  10000
              ],
              "zarr_format": 2
          }
  
      Initialize an array using a storage path::
  
          >>> store = dict()
          >>> init_array(store, shape=100000000, chunks=1000000, dtype='i1', path='foo')
          >>> sorted(store.keys())
          ['.zgroup', 'foo/.zarray']
          >>> print(store['foo/.zarray'].decode())
          {
              "chunks": [
                  1000000
              ],
              "compressor": {
                  "blocksize": 0,
                  "clevel": 5,
                  "cname": "lz4",
                  "id": "blosc",
                  "shuffle": 1
              },
              "dtype": "|i1",
              "fill_value": null,
              "filters": null,
              "order": "C",
              "shape": [
                  100000000
              ],
              "zarr_format": 2
          }
  
      Notes
      -----
      The initialisation process involves normalising all array metadata, encoding
      as JSON and storing under the '.zarray' key.
  
      """; 44, assignment; 45, call; 46, call; 47, string_content:default; 48, string_content:C; 49, identifier:path; 50, call; 51, identifier:_require_parent_group; 52, argument_list; 53, identifier:_init_array_metadata; 54, argument_list; 55, identifier:normalize_storage_path; 56, argument_list; 57, identifier:path; 58, keyword_argument; 59, keyword_argument; 60, keyword_argument; 61, identifier:store; 62, keyword_argument; 63, keyword_argument; 64, keyword_argument; 65, keyword_argument; 66, keyword_argument; 67, keyword_argument; 68, keyword_argument; 69, keyword_argument; 70, keyword_argument; 71, keyword_argument; 72, keyword_argument; 73, identifier:path; 74, identifier:store; 75, identifier:store; 76, identifier:chunk_store; 77, identifier:chunk_store; 78, identifier:overwrite; 79, identifier:overwrite; 80, identifier:shape; 81, identifier:shape; 82, identifier:chunks; 83, identifier:chunks; 84, identifier:dtype; 85, identifier:dtype; 86, identifier:compressor; 87, identifier:compressor; 88, identifier:fill_value; 89, identifier:fill_value; 90, identifier:order; 91, identifier:order; 92, identifier:overwrite; 93, identifier:overwrite; 94, identifier:path; 95, identifier:path; 96, identifier:chunk_store; 97, identifier:chunk_store; 98, identifier:filters; 99, identifier:filters; 100, identifier:object_codec; 101, identifier:object_codec
code: def init_array(store, shape, chunks=True, dtype=None, compressor='default',
                 fill_value=None, order='C', overwrite=False, path=None,
                 chunk_store=None, filters=None, object_codec=None):
      """Initialize an array store with the given configuration. Note that this is a low-level
      function and there should be no need to call this directly from user code.
  
      Parameters
      ----------
      store : MutableMapping
          A mapping that supports string keys and bytes-like values.
      shape : int or tuple of ints
          Array shape.
      chunks : int or tuple of ints, optional
          Chunk shape. If True, will be guessed from `shape` and `dtype`. If
          False, will be set to `shape`, i.e., single chunk for the whole array.
      dtype : string or dtype, optional
          NumPy dtype.
      compressor : Codec, optional
          Primary compressor.
      fill_value : object
          Default value to use for uninitialized portions of the array.
      order : {'C', 'F'}, optional
          Memory layout to be used within each chunk.
      overwrite : bool, optional
          If True, erase all data in `store` prior to initialisation.
      path : string, optional
          Path under which array is stored.
      chunk_store : MutableMapping, optional
          Separate storage for chunks. If not provided, `store` will be used
          for storage of both chunks and metadata.
      filters : sequence, optional
          Sequence of filters to use to encode chunk data prior to compression.
      object_codec : Codec, optional
          A codec to encode object arrays, only needed if dtype=object.
  
      Examples
      --------
      Initialize an array store::
  
          >>> from zarr.storage import init_array
          >>> store = dict()
          >>> init_array(store, shape=(10000, 10000), chunks=(1000, 1000))
          >>> sorted(store.keys())
          ['.zarray']
  
      Array metadata is stored as JSON::
  
          >>> print(store['.zarray'].decode())
          {
              "chunks": [
                  1000,
                  1000
              ],
              "compressor": {
                  "blocksize": 0,
                  "clevel": 5,
                  "cname": "lz4",
                  "id": "blosc",
                  "shuffle": 1
              },
              "dtype": "<f8",
              "fill_value": null,
              "filters": null,
              "order": "C",
              "shape": [
                  10000,
                  10000
              ],
              "zarr_format": 2
          }
  
      Initialize an array using a storage path::
  
          >>> store = dict()
          >>> init_array(store, shape=100000000, chunks=1000000, dtype='i1', path='foo')
          >>> sorted(store.keys())
          ['.zgroup', 'foo/.zarray']
          >>> print(store['foo/.zarray'].decode())
          {
              "chunks": [
                  1000000
              ],
              "compressor": {
                  "blocksize": 0,
                  "clevel": 5,
                  "cname": "lz4",
                  "id": "blosc",
                  "shuffle": 1
              },
              "dtype": "|i1",
              "fill_value": null,
              "filters": null,
              "order": "C",
              "shape": [
                  100000000
              ],
              "zarr_format": 2
          }
  
      Notes
      -----
      The initialisation process involves normalising all array metadata, encoding
      as JSON and storing under the '.zarray' key.
  
      """
  
      # normalize path
      path = normalize_storage_path(path)
  
      # ensure parent group initialized
      _require_parent_group(path, store=store, chunk_store=chunk_store, overwrite=overwrite)
  
      _init_array_metadata(store, shape=shape, chunks=chunks, dtype=dtype,
                           compressor=compressor, fill_value=fill_value,
                           order=order, overwrite=overwrite, path=path,
                           chunk_store=chunk_store, filters=filters,
                           object_codec=object_codec)