numpy_helper_functions
Auxiliary functions for numpy.ndarrays
and
general mathematical functions.
This module can be called from mdtools
via the shortcut nph
:
import mdtools as mdt
mdt.nph # instead of mdt.numpy_helper_functions
Todo
Finish/revise the implementation of the functions and their
docstrings. Revision is finished until
mdtools.numpy_helper_functions.ceil_divide()
(in source code
order, not the alphabetical documentation order). Basically, this
means that all functions having an ‘Examples’ section in their
docstring are revised, all other functions are not.
Functions
Get the indices of the maximum values along an axis. |
|
Get the indices of the minimum values along an axis. |
|
Calculate element-wise ceil division. |
|
Extract a cross section from a 2-dimensional array along a given line using |
|
Extract a cross section from a 2-dimensional array along a given axis. |
|
Calculate the difference between array elements respecting the minimum image convention. |
|
Return the indices of the multi-dimensional bins to which each value in the input array belongs. |
|
Convert an integer to its corresponding Excel-style column name. |
|
Convert an Excel-style column name to its corresponding integer number. |
|
Extend an axis of an array to a given length by padding a given value at the end of the axis. |
|
Find the longest sequence of constant values in an array. |
|
Find the first sequence of at least n constant values in an array. |
|
Find linear regions in a data array. |
|
Find the values in an array which are closest to a given value along an axis. |
|
Get all sequences of constant values in an array. |
|
Get the n innermost elements of a 1-dimensional array. |
|
Group the elements of values by their keys. |
|
Get the indices of item changes in an array. |
|
Construct a tuple of index arrays suitable to directly index an array a from an array of indices along an axis of a. |
|
Get the indices of an array where its elements change along a given axis. |
|
Get the indices of a 1-dimensional array where its elements change. |
|
Locate the positions of item changes in an array. |
|
Bring two arrays to the same shape by padding a given value at the end of of the axes of the shorter array. |
|
"Sequenize" the values of an array. |
|
Split an array into subarrays of contiguous sequences. |
|
Subtract two arrays element-wise respecting the minium image convention. |
|
Create a symmetrized copy of a 2-dimensional array. |
|
Take a slice from an array along an axis. |
|
Tilt a 2-dimensional array by 45 degrees so that the diagonals will either be converted to columns (if tilted clockwise) or to rows (if tilted counterclockwise). |
|
Get the number of trailing digits in an integer. |
|
Integrate z(x,y) within the given limits using |