KCL-BMEIS/ExeTera

minor bug: dtype in session._apply_spans_src should be based on spans length not target_.dtype

deng113jie opened this issue · 2 comments

dtype in session.apply_spans_src should be based on spans length not target.dtype
For example, the target_.dtype can be int8, if the data in categorical; but when the span is longer than 128, then the result index is going to be out of the number representable by int8.
Hence, the target_.dtype should be depend on the length of span

the dest dtype should also depents on the predicate, for example min, max should be the same dtype of src, but index_min or index_max should return the dtype based on src length (span length)

More generally, we should have a function return dtype (in utils) for all np.zeros/field construct calls in the code base (mostly in operations.py)