pytorch-frame icon indicating copy to clipboard operation
pytorch-frame copied to clipboard

modify double np.hstack to single np.ravel

Open February24-Lee opened this issue 1 year ago • 1 comments

# before
np.hstack(np.hstack(x))

# after
np.stack(x)

When I tested the time with 880,591 x 1 series data, the running time improved from almost 2.5 seconds to within 1.0 second.

I thought the usage of double np.hstack was for StateType.sequence_numerical. In this case, np.stack will be fine. But if there is something I missed, please let me know.

February24-Lee avatar May 22 '24 12:05 February24-Lee

oh, there were something I missed. I will check and re-try to PR

February24-Lee avatar May 22 '24 12:05 February24-Lee