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')
¶
descriptive statistics on an array interpreted as a vector
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v |
ndarray
|
the array |
required |
name |
str | None
|
its name |
'v'
|
Returns:
Type | Description |
---|---|
Any
|
the |
Source code in bs_python_utils/bssputils.py
18 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)
¶
one-dimensional spline interpolation of vector y
on vector x
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
ndarray
|
vector of y-values |
required |
x |
ndarray
|
vector of x-values |
required |
x_new |
ndarray | None
|
where we evaluate (at the points in |
None
|
is_sorted |
bool | None
|
True if |
False
|
smooth |
bool | None
|
True if we want a smoother; otherwise we go through all points provided |
True
|
Returns:
Type | Description |
---|---|
ndarray
|
values interpolated 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 |
|