bssputils module¶
Contains scipy
utility programs:
describe_array
: report descriptive statistics on a vectorized arrayspline_reg
: spline interpolation in one dimension.
describe_array(v, name='v')
¶
Print a summary of descriptive statistics for a 1-D array.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v
|
ndarray
|
Array to summarise (flattened to one dimension). |
required |
name
|
str | None
|
Optional label printed alongside the summary. |
'v'
|
Returns:
Type | Description |
---|---|
Any
|
The |
Source code in bs_python_utils/bssputils.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
spline_reg(y, x, x_new=None, is_sorted=False, smooth=True)
¶
Interpolate y
as a function of x
using univariate splines.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y
|
ndarray
|
Observed response values. |
required |
x
|
ndarray
|
Covariate locations. |
required |
x_new
|
ndarray | None
|
Evaluation points; defaults to |
None
|
is_sorted
|
bool | None
|
Set to |
False
|
smooth
|
bool | None
|
When |
True
|
Returns:
Type | Description |
---|---|
ndarray
|
The interpolated values evaluated at |
Source code in bs_python_utils/bssputils.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|