Module utils¶
utils
¶
Functions:
-
as_xarray_series– -
c–Emulate the R c (concatenate) function, somewhat.
-
is_common_iterable–True if an object is iterable but not a string (str)
-
mk_full_data_id–Create swift IDs (dot separated hierarchical naming scheme)
-
parameter_df– -
parameters_df– -
paste–Port of R paste function
-
paste0–Port of R paste0 function
-
paste_2–Port of R vectorised paste, for 2 elements
-
paste_list_scalar– -
paste_lists– -
paste_scalar_list– -
paste_scalar_scalar– -
reduce_concat– -
rep– -
sort_by–Sort one vector according to the known reordering of another
-
vpaste–vectorised paste for 2 elements; Port of R paste0 in spirit
c
¶
Emulate the R c (concatenate) function, somewhat.
Returns:
-
ndarray–np.ndarray: [description]
is_common_iterable
¶
True if an object is iterable but not a string (str)
mk_full_data_id
¶
Create swift IDs (dot separated hierarchical naming scheme)
Create swift IDs (dot separated hierarchical naming scheme). Note that the behavior is different than 'paste' for empty characters.
Parameters:
-
args(Any, default:()) –one or more character vectors.
Examples:
TODO
parameters_df
¶
parameters_df(names: List[str], values: Sequence[float], minima: Sequence[float], maxima: Sequence[float])
paste_2
¶
Port of R vectorised paste, for 2 elements
paste_scalar_list
¶
sort_by
¶
Sort one vector according to the known reordering of another
Parameters:
-
x(Any) –values to sort
-
unsorted_reference(Any) –unique 'keys' corresponding to each element in x
-
sorted_reference(Any) –set of 'keys', identical as a set to unsorted_reference, but sorted
Returns:
-
–
the values in x reordered such that the same reordering of unsorted_reference matches sorted_reference
Examples:
TODO
vpaste
¶
vectorised paste for 2 elements; Port of R paste0 in spirit
Parameters:
-
root(VecScalars) –left hand side(s) of the paste
-
vars(VecScalars) –right hand side(s) of the paste
Returns:
-
Union[str, Sequence[str]]–Union[str,Sequence[str]]: pasted scalars