Rows with just one number are arrays with one element
Closed this issue · 3 comments
maxnoe commented
I think this is a bit impractical:
In [1]: from zfits import FactFitsCalib
In [2]: f = FactFitsCalib('20160817_016.fits.fz', '20160817_030.drs.fits.gz')
In [3]: e = next(f)
In [4]: e['EventNum']
Out[5]: array([1], dtype=int32)
dneise commented
It is impractical, but isn't it "better" to return a dict with all np.arrays one can ask for shape
instead of a few numbers and a few arrays?
I mean, this way it is more homogeneous. its a map<string, np.array> and not a map <string, find_it_out_yourself>
...
maxnoe commented
I think it's principle of least surprise for EventNum
to be an int, not an int array with one element.
dneise commented
Okay it should be an easy fix.