minor bug: dtype in session._apply_spans_src should be based on spans length not target_.dtype
deng113jie opened this issue · 2 comments
deng113jie commented
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
deng113jie commented
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)
deng113jie commented
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)