trace.correlate: fixed a problem with newer scipy versions