MCPcopy
hub / github.com/numpy/numpy / _parse_output_order

Function _parse_output_order

numpy/_core/einsumfunc.py:1126–1141  ·  view source on GitHub ↗
(order, a_is_fcontig, b_is_fcontig)

Source from the content-addressed store, hash-verified

1124
1125@functools.lru_cache(maxsize=64)
1126def _parse_output_order(order, a_is_fcontig, b_is_fcontig):
1127 order = order.upper()
1128 if order == "K":
1129 return None
1130 elif order in "CF":
1131 return order
1132 elif order == "A":
1133 if a_is_fcontig and b_is_fcontig:
1134 return "F"
1135 else:
1136 return "C"
1137 else:
1138 raise ValueError(
1139 "ValueError: order must be one of "
1140 f"'C', 'F', 'A', or 'K' (got '{order}')"
1141 )
1142
1143
1144def bmm_einsum(eq, a, b, out=None, **kwargs):

Callers 1

bmm_einsumFunction · 0.85

Calls 1

upperMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…