@@ -38,8 +38,8 @@ def create(
3838 uri : str ,
3939 * ,
4040 schema : pa .Schema ,
41+ domain : Sequence [tuple [Any , Any ] | None ],
4142 index_column_names : Sequence [str ] = (options .SOMA_JOINID ,),
42- domain : Sequence [tuple [Any , Any ] | None ] | None = None ,
4343 platform_config : options .PlatformConfig | None = None ,
4444 context : Any | None = None ,
4545 ) -> Self :
@@ -65,23 +65,11 @@ def create(
6565 index column name is required.
6666
6767 domain:
68- An optional sequence of tuples specifying the domain of each
69- index column. Each tuple must be a pair consisting of the
70- minimum and maximum values storable in the index column. For
71- example, if there is a single int64-valued index column, then
72- ``domain`` might be ``[(100, 200)]`` to indicate that values
73- between 100 and 200, inclusive, can be stored in that column.
74- If provided, this sequence must have the same length as
75- ``index_column_names``, and the index-column domain will be as
76- specified. If omitted entirely, or if ``None`` in a given
77- dimension, the corresponding index-column domain will use an
78- empty range, and data writes after that will fail with an
79- exception. Unless you have a particular reason not to, you
80- should always provide the desired `domain` at create time: this
81- is an optional but strongly recommended parameter. See also
82- ``change_domain`` which allows you to expand the domain after
83- create.
84-
68+ A sequence of tuples specifying the domain of each index
69+ column. Each tuple must be a pair consisting of the minimum
70+ and maximum values storable in the index column. This sequence
71+ must have the same length as ``index_column_names``. Use ``None`` for string
72+ index columns when the implementation does not support string domains.
8573 platform_config: platform-specific configuration; keys are SOMA
8674 implementation names.
8775
@@ -171,9 +159,9 @@ def change_domain(
171159
172160 The argument must be a tuple of pairs of low/high values for the desired
173161 domain, one pair per index column. For string index columns, you must
174- offer the low/high pair as `("", "")`, or as ``None``. If ``check_only``
175- is ``True``, returns whether the operation would succeed if attempted,
176- and a reason why it would not.
162+ offer the low/high pair as `("", "")`, or as ``None`` for string columns . If
163+ ``check_only`` is ``True``, returns whether the operation would succeed if
164+ attempted, and a reason why it would not.
177165
178166 For example, suppose the dataframe's sole index-column name is
179167 ``"soma_joinid"`` (which is the default at create). If the dataframe's
@@ -263,7 +251,7 @@ def create(
263251 uri : str ,
264252 * ,
265253 type : pa .DataType ,
266- shape : Sequence [int | None ],
254+ shape : Sequence [int ],
267255 platform_config : options .PlatformConfig | None = None ,
268256 context : Any | None = None ,
269257 ) -> Self :
@@ -273,16 +261,10 @@ def create(
273261 uri: The URI where the array will be created.
274262 type: The Arrow type to store in the array.
275263 If the type is unsupported, an error will be raised.
276- shape: The maximum capacity of each dimension, including room
277- for any intended future appends, specified as one element
278- per dimension, e.g. ``(100, 10)``. All lengths must be in
279- the positive int64 range, or ``None``. It's necessary to say
280- ``shape=(None, None)`` or ``shape=(None, None, None)``,
281- as the sequence length determines the number of dimensions
282- (N) in the N-dimensional array.
283-
284- For sparse arrays only, if a slot is None, then the maximum
285- possible int64 will be used, making a sparse array growable.
264+ shape: The initial maximum capacity of each dimension, specified
265+ as one element per dimension, e.g. ``(100, 10)`` for a 2D array.
266+ All lengths must be in the positive int64 range. The shape can
267+ be increased after creation using :meth:`resize`.
286268
287269 Returns: The newly created array, opened for writing.
288270
0 commit comments