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 # insetad 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. |
|
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 linear regions in a data array. |
|
Find the values in an array which are closest to a given value along an axis. |
|
Get the n innermost elements of a 1-dimensional array. |
|
Group the elements of values by their keys. |
|
Construnct 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. |
|
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 its subarrays of consecutive numbers. |
|
Create a symmetrized copy of a 2-dimensional array. |
|
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 |