Skip to content

different numpy version gives different result #14

@dingwanggmail

Description

@dingwanggmail

in diPLSlib/functions.py, line 567

if(np.sum(xt) != 0): # Deflate target matrix only if not zero

I couldn't understand why we need to check if np.sum(xt) equals 0 or not, and this line generates different result in different numpy version, because xt is often demeaned already, np.sum(xt) is a very very small number such as 1e-13.

I'm wondering if changing it to np.abs(np.sum(xt)) >= 1e-15 will work more robust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions