Follow-up from "Draft: Implementing of Integrator"
The following discussions from !14 (closed) should be addressed:
-
@maxfl started a discussion: (+1 comment) that is not correct. new shape accounts for bins with 0 points. You may have all the orders=0, the output should be still len(orders), It just will contain empty bins.
-
@maxfl started a discussion: why do you need if/else here? I guess only
else
clause is sufficient.Also the check should be exact
len(data) == sum(orders)
for 1d. -
@maxfl started a discussion: (+1 comment) it is a bad habit to access containers repeatedly like in
self.inputs[0].shape[0]
. If you need it twice, make a variable. You usually do not know whatinputs[0]
does and how inefficient it might be. -
@maxfl started a discussion: (+1 comment) you need to
- set
data[i]=0
- step i here
The same goes for the 2d case. In general you might use enumerate as there is no need to skip i.
- set