• Tjerk Vreeken's avatar
    Add convenience method for merging bounds · 1c596b67
    Tjerk Vreeken authored
    A common desire is to update bounds on variables based on some
    additional source of data. When doing so, one wants to derive the
    intersection of the existing bounds and the bounds following from the
    additional data. When the types of these bounds do not match, this
    becomes a difficult task, resulting in users setting bounds looser than
    might be possible.
    
    The convience method added in this commit handles such type conversions
    for the user. It handles upcasting floats to Timeseries, and also
    handles various combinations of vector bounds (as 2D Timeseries or
    1D NumPy arrays).
    
    Note that this convenience does come at the cost of performance. A
    simple min/max merge on bounds which are known to be scalar can be done
    in about 350 ns, whereas the method added in this commit takes about 10
    times as long with 3.5 us. Merging a combination Timeseries and NumPy
    arrays can easily take 30-40 us per call.
    
    Closes #1074
    1c596b67
Name
Last commit
Last update
doc Loading commit data...
examples Loading commit data...
src/rtctools Loading commit data...
tests Loading commit data...
xsd Loading commit data...
.codecov.yml Loading commit data...
.coveragerc Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
MANIFEST.in Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...
versioneer.py Loading commit data...