Skip to content

Commit

Permalink
1. Improve ds2numpy code and test
Browse files Browse the repository at this point in the history
  1. small fixes for `ostap.utuls.split_ranges`
  1. add conversion to int for `RooAbsCategory`
  1. add iterator/contains/len functions for `RooAbsDataStore`
  • Loading branch information
VanyaBelyaev committed Dec 5, 2023
1 parent 1be4419 commit 8971914
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 247 deletions.
4 changes: 4 additions & 0 deletions ReleaseNotes/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
1. add test for `ostap.stats.ustat` module
1. Add `Ostap::Math::two_samples` function
1. Add the first version of code for RooDataSety -> numpy conversion by Artem Egorychev
1. Improve `ds2numpy` code and test
1. small fixes for `ostap.utuls.split_ranges`
1. add conversion to int for `RooAbsCategory`
1. add iterator/contains/len functions for `RooAbsDataStore`


## Backward incompatible:
Expand Down
10 changes: 10 additions & 0 deletions ostap/fitting/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,16 @@ def _rds_make_unique_ ( dataset ,
]


ROOT.RooAbsDataStore . __len__ = lambda s : s.numEntries()
ROOT.RooAbsDataStore . __iter__ = _rad_iter_
ROOT.RooAbsDataStore . __contains__ = _rad_contains_


_new_methods_ += [
ROOT.RooAbsDataStore . __len__ ,
ROOT.RooAbsDataStore . __iter__ ,
ROOT.RooAbsDataStore . __contains__
]
# =============================================================================
## Helper project method for RooDataSet/DataFrame/... and similar objects
#
Expand Down
Loading

0 comments on commit 8971914

Please sign in to comment.