pwrs.core.i2e_field#
- pwrs.core.i2e_field.i2e_field(mpc, field, ordering, dim=1)[source]#
Convert a case struct field from internal to external ordering.
Saves the current internal-order value for
fieldundermpc['order']['int']and replaces the live field value with the external-order version produced byi2e_data.- Parameters:
mpc (dict) – MATPOWER case struct in internal order, with
ordermetadata.field (str or sequence of str) – Field name or nested field path to convert.
ordering (str or sequence) – MATPOWER ordering descriptor used for the conversion.
dim (int, optional) – One-based dimension along which to reorder.
nargout (int, optional) – MATLAB compatibility flag.
- Returns:
Updated MATPOWER case struct with the converted field.
- Return type:
dict