Get the axis_order set by any containing axis_order_scope. Returns: List of strings giving an order to use for axis names, or None, if no axis order is set.
()
| 777 | |
| 778 | @tc.returns(tc.Optional(tc.List(string_types))) |
| 779 | def get_axis_order(): |
| 780 | """Get the axis_order set by any containing axis_order_scope. |
| 781 | |
| 782 | Returns: |
| 783 | List of strings giving an order to use for axis names, or None, if no axis |
| 784 | order is set. |
| 785 | """ |
| 786 | # By storing axis_order in the graph, we can ensure that axis_order_scope is |
| 787 | # thread-safe. |
| 788 | axis_order_list = ops.get_collection(_AXIS_ORDER_KEY) |
| 789 | if axis_order_list: |
| 790 | axis_order, = axis_order_list |
| 791 | else: |
| 792 | axis_order = None |
| 793 | return axis_order |
| 794 | |
| 795 | |
| 796 | @tc.accepts(tc.Optional(tc.List(string_types))) |
no test coverage detected