bayespy.utils.misc¶
General numerical functions and methods.
Functions
|
Transpose the matrix. |
|
|
|
|
|
|
|
|
|
|
|
Construct a symmetric block-banded matrix. |
|
Form a block diagonal array from the given arrays. |
|
Explicitly broadcast arrays to same shapes. |
|
Computes the resulting broadcasted shape for a given set of shapes. |
|
Computes the resulting broadcasted shape for a given set of arrays. |
|
Compute the plate multiplier for given shapes. |
|
Compute a divided by b and rounded up. |
|
Construct a function composition from a list of functions. |
|
Concatenate arrays along a given axis. |
|
Create a diagonal array given the diagonal elements. |
|
|
|
|
|
Given set sizes and an index, returns the index of the set |
|
|
|
|
|
|
|
Get the diagonal of an array. |
|
|
|
Returns meshgrid as a (M*N,2)-shape array. |
|
|
|
Inverse gamma function. |
|
Inverse digamma (psi) function. |
|
|
|
|
|
|
|
|
|
|
|
Compute log(sum(exp(X)) in a numerically stable way |
|
Returns the derivative of the log of multivariate gamma. |
|
|
|
Create a diagonal array given the diagonal elements. |
|
Make tuples equal length. |
|
Add trailing unit axes so that arrays have equal ndim |
|
Compute the mean, ignoring NaNs. |
|
Move the axis axis_from to position axis_to. |
|
Returns the derivative of the log of multivariate gamma. |
|
|
|
Compute element-wise product of lists/tuples. |
|
|
|
|
|
Compute exp(phi) so that exp(phi) sums to one. |
|
Parse command line arguments of style "--parameter=value". |
|
A kind of inverse mapping of np.take |
|
An inverse operation of np.take with accumulation and broadcasting. |
|
|
|
|
|
|
|
Makes sure that indices are valid for given shape. |
|
Remove leading axes that have unit length. |
|
|
|
|
|
Compute the product of the arguments and sum to the target shape. |
|
|
|
Sum leading axes of A such that A has dim dimensions. |
|
Sum axes of the array such that the resulting shape is as given. |
|
Make X symmetric. |
|
|
|
|
|
Remove duplicate items from a list while preserving order. |
|
Writes the given array into the HDF5 file. |
|
Combines lists by alternating elements from them. |
Classes
|
Simple base class for unit testing. |