Currently the union_all function has a default to union over axis 0:
|
def union_all(geometries, axis=0, **kwargs): |
|
"""Returns the union of multiple geometries. |
|
|
|
Parameters |
|
---------- |
|
geometries : array_like |
|
axis : int |
|
Axis along which the operation is performed. The default (zero) |
|
performs the operation over the first dimension of the input array. |
|
axis may be negative, in which case it counts from the last to the |
|
first axis. |
I was wondering if axis=None wouldn't be a better default (in which case it always gives a single geometry by default, regardless of the shape of the array), since that is also the default of numpy reductions (eg sum). Or did we have a specific reason to have the axis=0 deviation?
Currently the
union_allfunction has a default to union over axis 0:pygeos/pygeos/set_operations.py
Lines 162 to 172 in e83fc03
I was wondering if
axis=Nonewouldn't be a better default (in which case it always gives a single geometry by default, regardless of the shape of the array), since that is also the default of numpy reductions (eg sum). Or did we have a specific reason to have the axis=0 deviation?