You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this would make it easier for new users to construct a DataArray with
ticks just from looking at the DataArray signature. No magic tuples needed. It would match the
signature of Axis. My use case is to use ticks only and not names axes (at
first), so:
::
>>> DataArray([[1, 2], [3, 4]], ticks=[['A', 'B'], ['C', 'D']])
instead of the current:
::
>>> DataArray([[1, 2], [3, 4]], ((None, ['A','B']), (None, ['C', 'D'])))
It might also cause less typos (parentheses matching) at the command line.
Having separate labels and ticks input parameters would also leave the option
open to allow any hashable object, like a tuple, to be used as a label.
Currently tuples have a special meaning, the (labels, ticks) tuple.
The text was updated successfully, but these errors were encountered:
What do you think of adding a ticks parameter to DataArray?
Current behavior:
Proposed ticks as separate input parameter:
I think this would make it easier for new users to construct a DataArray with
ticks just from looking at the DataArray signature. No magic tuples needed. It would match the
signature of Axis. My use case is to use ticks only and not names axes (at
first), so:
::
>>> DataArray([[1, 2], [3, 4]], ticks=[['A', 'B'], ['C', 'D']])
instead of the current:
::
>>> DataArray([[1, 2], [3, 4]], ((None, ['A','B']), (None, ['C', 'D'])))
It might also cause less typos (parentheses matching) at the command line.
Having separate labels and ticks input parameters would also leave the option
open to allow any hashable object, like a tuple, to be used as a label.
Currently tuples have a special meaning, the (labels, ticks) tuple.
The text was updated successfully, but these errors were encountered: