pwrs.core.set_reorder#
- pwrs.core.set_reorder.set_reorder(A, B, idx, dim)[source]#
Insert reordered slices along a specified dimension.
Mirrors MATPOWER’s
set_reorderhelper by writingBintoAat the one-based indicesidxalong the requested dimension, expanding the target array shape when necessary.- Parameters:
A (array_like) – Destination array-like value.
B (array_like) – Source values to insert.
idx (array_like) – One-based destination indices.
dim (int) – One-based dimension along which to assign.
nargout (int, optional) – MATLAB compatibility flag.
- Returns:
Updated array with
Binserted intoA.- Return type:
numpy.ndarray