File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
src/boost_histogram/_internal Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11# What's new in boost-histogram
22
3- ## Version 1.1
3+ ## Version 1.2
44
5- ### Version 1.1.1
5+ ### Version 1.2.0
66
77#### User changes
88* Python 3.10 officially supported, with wheels.
1111
1212#### Bug fixes
1313* Support custom setters on AxesTuple subclasses. [ #627 ] [ ]
14+ * Faster picking if slices are not also used [ #645 ] [ ]
1415* Throw an error when an AxesTuple setter is the wrong length (inspired by zip strict in Python 3.10) [ #627 ] [ ]
1516* Fix error thrown on comparison with axis and non-axis object [ #631 ] [ ]
1617* Static typing no longer thinks ` storage= ` is required [ #604 ] [ ]
2627[ #627 ] : https://github.com/scikit-hep/boost-histogram/pull/627
2728[ #631 ] : https://github.com/scikit-hep/boost-histogram/pull/631
2829[ #636 ] : https://github.com/scikit-hep/boost-histogram/pull/636
30+ [ #645 ] : https://github.com/scikit-hep/boost-histogram/pull/645
2931[ #647 ] : https://github.com/scikit-hep/boost-histogram/pull/647
3032
33+ ## Version 1.1
34+
3135### Version 1.1.0
3236
3337#### User changes
Original file line number Diff line number Diff line change @@ -841,8 +841,16 @@ def __getitem__( # noqa: C901
841841 assert isinstance (stop , int )
842842 slices .append (_core .algorithm .slice_and_rebin (i , start , stop , merge ))
843843
844- logger .debug ("Reduce with %s" , slices )
845- reduced = self ._hist .reduce (* slices )
844+ if slices :
845+ logger .debug ("Reduce with %s" , slices )
846+ reduced = self ._hist .reduce (* slices )
847+ elif pick_set or pick_each or integrations :
848+ # Can avoid a copy in these cases, will be copied anyway
849+ logger .debug ("Reduce is empty, but picking or slicing, so no copy needed" )
850+ reduced = self ._hist
851+ else :
852+ logger .debug ("Reduce is empty, just making a copy" )
853+ reduced = copy .copy (self ._hist )
846854
847855 if pick_set :
848856 warnings .warn (
You can’t perform that action at this time.
0 commit comments