None of the examples posted in use cases show combinations of position and
keyword indexing. This feels like an important example, and moreover
without it, the discussion of what sentinel to use is less motivated.
In discussions, I have mentioned two examples, e.g.
distances[4:7, 100:120, 30:40, unit="metres"]
Which could make comparisons of arrays with different internal units easier.
disributed_array[4:7, 100:120, 30:40, source="worker1"]
Which works be a natural way to address data that is *eventually
consistent" in a cluster.
But other examples are equally good. I think a soft change in an existing
example makes it a better API:
molecular_energy[4:7, 100:120, 30:40, BasisSet=Z3]
These all amount to basically the same thing. They are not "pure indexing"
but rather delivering a slice/region of data that is described by some
metadata.
However, even in the "pure indexing" these types of uses seem likely:
observation_region[4:7, 100:120, 30:40, measure=feature.temperature,
time=start:end]
observation_region[4:7, 100:120, 30:40, measure=feature.pressure,
time=start:end]
I.e. the underlying array is 5-D, but the spatial dimensions are unnamed
(and in the hypothetical there is no inherent orientation like
latitude/longitude/altitude), but the 4th and 5th axes describe the
variation in which instrument is make a measurement and what timestamps
each measurement was made at.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/2NWQINYNBXVPGMQFBM7YRZLZI3Z6ICSB/
Code of Conduct: http://python.org/psf/codeofconduct/